test(contacts): isolate duplicate-name assertion from demo seed #331

Merged
David merged 2 commits from fix/PMS-464-company-dup-test-demo-seed into main 2026-06-21 19:05:01 +02:00
Owner

The company_rejects_duplicate_name integration test asserted that a
substring search for "acme" returned exactly ["Acme"]. First-visit demo
seeding (PMS-157) inserts a company named "Acme Corporation (Demo)" into
the test tenant, which the case-insensitive substring search also matches,
so the result became ["Acme Corporation (Demo)", "Acme"] and the strict
equality assertion failed. Assert against the inserted row only by
filtering the search results to the exact "Acme" name and requiring a
count of one, which still proves no duplicate row was inserted while
being robust to unrelated seeded data.

#PMS-464

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

The company_rejects_duplicate_name integration test asserted that a substring search for "acme" returned exactly ["Acme"]. First-visit demo seeding (PMS-157) inserts a company named "Acme Corporation (Demo)" into the test tenant, which the case-insensitive substring search also matches, so the result became ["Acme Corporation (Demo)", "Acme"] and the strict equality assertion failed. Assert against the inserted row only by filtering the search results to the exact "Acme" name and requiring a count of one, which still proves no duplicate row was inserted while being robust to unrelated seeded data. #PMS-464 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test(contacts): isolate duplicate-name assertion from demo seed
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m6s
Check / fmt + clippy + build + tests (pull_request) Successful in 2m36s
Integration / integration tests (pull_request) Successful in 7m53s
5afc32bdbc
The company_rejects_duplicate_name integration test asserted that a
substring search for "acme" returned exactly ["Acme"]. First-visit demo
seeding (PMS-157) inserts a company named "Acme Corporation (Demo)" into
the test tenant, which the case-insensitive substring search also matches,
so the result became ["Acme Corporation (Demo)", "Acme"] and the strict
equality assertion failed. Assert against the inserted row only by
filtering the search results to the exact "Acme" name and requiring a
count of one, which still proves no duplicate row was inserted while
being robust to unrelated seeded data.

#PMS-464

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into fix/PMS-464-company-dup-test-demo-seed
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m2s
Check / fmt + clippy + build + tests (pull_request) Successful in 2m53s
Integration / integration tests (pull_request) Successful in 8m5s
Create release / Create release from merged PR (pull_request) Successful in 3s
22ad97ff17
David merged commit b6ce330f9a into main 2026-06-21 19:05:01 +02:00
David deleted branch fix/PMS-464-company-dup-test-demo-seed 2026-06-21 19:05:01 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!331
No description provided.