11package difc
22
33import (
4- "strings"
54 "testing"
65
76 "github.com/stretchr/testify/assert"
@@ -590,11 +589,11 @@ func TestViolationError_Error(t *testing.T) {
590589 msg := tt .err .Error ()
591590 assert .NotEmpty (t , msg )
592591 for _ , want := range tt .wantContains {
593- assert .True (t , strings . Contains ( msg , want ) ,
592+ assert .Contains (t , msg , want ,
594593 "expected %q in error message %q" , want , msg )
595594 }
596595 for _ , absent := range tt .wantAbsent {
597- assert .False (t , strings . Contains ( msg , absent ) ,
596+ assert .NotContains (t , msg , absent ,
598597 "expected %q NOT to be in error message %q" , absent , msg )
599598 }
600599 })
@@ -616,7 +615,7 @@ func TestViolationError_Detailed(t *testing.T) {
616615 base := err .Error ()
617616
618617 // Detailed should contain the base error message
619- assert .True (t , strings . Contains ( detailed , base ) , "detailed should include base error" )
618+ assert .Contains (t , detailed , base , "detailed should include base error" )
620619
621620 // Detailed should include agent and resource tag context
622621 assert .Contains (t , detailed , "Agent" )
0 commit comments