Skip to content

Commit 8a0222f

Browse files
committed
Fix ContactCreatedTrigger test failing after email normalization
The recent email normalization change (6343616) converts all emails to lowercase when stored in the database. The test was using a mixed-case email (containing shortuuid characters) but looking up timeline events with the original case, causing a mismatch. The fix normalizes the email variable after creating the contact, ensuring all subsequent lookups use the lowercase version that matches the database.
1 parent 6343616 commit 8a0222f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integration/automation_e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,8 @@ func testAutomationContactCreatedTrigger(t *testing.T, factory *testutil.TestDat
26202620
t.Fatalf("ContactCreatedTrigger CreateContact: Expected 200, got %d: %s", contactResp.StatusCode, string(body))
26212621
}
26222622
contactResp.Body.Close()
2623+
// Normalize email to match what's stored in the database (lowercase)
2624+
email = domain.NormalizeEmail(email)
26232625
t.Logf("Contact created via HTTP API: %s (NOT subscribed to list %s)", email, listID)
26242626

26252627
// 5. Wait for contact.created timeline event to be created

0 commit comments

Comments
 (0)