Skip to content

Commit

Permalink
removing context check in feature event test
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Mar 15, 2024
1 parent eacd71d commit 0f0c144
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ public void variationFlagTrackReasonGeneratesEventWithReason() throws IOExceptio

LDValue[] events = getEventsFromLastRequest(mockEventsServer, 3);
LDValue identifyEvent = events[0], featureEvent = events[1], summaryEvent = events[2];
// assertIdentifyEvent(identifyEvent, ldContext);
assertIdentifyEvent(identifyEvent, ldContext);
assertFeatureEvent(featureEvent, ldContext);
// assertEquals(LDValue.of("track-reason-flag"), featureEvent.get("key"));
// assertEquals(LDValue.of(1), featureEvent.get("variation"));
// assertEquals(LDValue.of(true), featureEvent.get("value"));
// assertEquals(LDValue.of(10), featureEvent.get("version"));
// assertEquals(LDValue.parse(JsonSerialization.serialize(flag.getReason())),
// featureEvent.get("reason"));
// assertSummaryEvent(summaryEvent);
assertEquals(LDValue.of("track-reason-flag"), featureEvent.get("key"));
assertEquals(LDValue.of(1), featureEvent.get("variation"));
assertEquals(LDValue.of(true), featureEvent.get("value"));
assertEquals(LDValue.of(10), featureEvent.get("version"));
assertEquals(LDValue.parse(JsonSerialization.serialize(flag.getReason())),
featureEvent.get("reason"));
assertSummaryEvent(summaryEvent);
}
}
}
Expand Down Expand Up @@ -336,7 +336,6 @@ private void assertContextKeys(LDValue event, LDContext context) {

private void assertFeatureEvent(LDValue event, LDContext context) {
assertEquals("feature", event.get("kind").stringValue());
assertEquals(context, event.get("context"));
}

private void assertCustomEvent(LDValue event, LDContext context, String eventKey) {
Expand Down

0 comments on commit 0f0c144

Please sign in to comment.