diff --git a/assert/Asserter_test.go b/assert/Asserter_test.go index c63c0af..05bb530 100644 --- a/assert/Asserter_test.go +++ b/assert/Asserter_test.go @@ -1137,6 +1137,8 @@ func TestAsserter_Contain_stringHasSub(t *testing.T) { IsFailed bool } + type Str string + for _, tc := range []TestCase{ { Desc: "when doesn't have sub", @@ -1162,6 +1164,12 @@ func TestAsserter_Contain_stringHasSub(t *testing.T) { Sub: "world!", IsFailed: false, }, + { + Desc: "when string based type has subset of a primite string", + String: Str("foo-bar-baz"), + Sub: "bar", + IsFailed: false, + }, } { t.Run(tc.Desc, AssertContainsTestCase(tc.String, tc.Sub, tc.IsFailed)) }