0.2.54
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user