test: fix non-ParadeDB project search count assertion

ILIKE '%Test1%' matches Test1, Test10, Test11, Test19 + favorites = 5,
not 2. Also use 'Test2"' pattern to avoid matching Test20/Test21.
This commit is contained in:
kolaente
2026-03-05 12:06:44 +01:00
parent c7c63e8ead
commit df0e3a84a9

View File

@@ -61,8 +61,9 @@ func TestProject(t *testing.T) {
// Test2-Test9 (edit distance 1), Test10+ (prefix), etc.
require.Len(t, projects, 12)
} else {
require.Len(t, projects, 2)
assert.NotContains(t, rec.Body.String(), `Test2`)
// ILIKE '%Test1%' matches Test1, Test10, Test11, Test19, + favorites
require.Len(t, projects, 5)
assert.NotContains(t, rec.Body.String(), `Test2"`)
assert.NotContains(t, rec.Body.String(), `Test3`)
assert.NotContains(t, rec.Body.String(), `Test4`)
assert.NotContains(t, rec.Body.String(), `Test5`)