This commit is contained in:
ponzischeme89
2026-08-12 08:25:15 +12:00
parent e30962245e
commit 4b31946635
28 changed files with 439 additions and 130 deletions
+10
View File
@@ -36,3 +36,13 @@ func TestJourneyEventRejectsFreeTextAndUnknownVocabulary(t *testing.T) {
t.Fatal("unknown action was accepted")
}
}
func TestJourneyEventRetainsTheItemName(t *testing.T) {
now := time.Now().UTC()
payload := journeyEventPayload{UserID: "u1", JourneyID: "j1", Category: "content",
Action: "open", ItemName: "Hunt for the Wilderpeople", ItemType: "Movie"}
event, ok := toJourneyEvent(payload, "u1", now)
if !ok || event.ItemName != payload.ItemName {
t.Fatalf("item name was not retained: %+v", event)
}
}