Skip to content

Commit 825a3fe

Browse files
author
Niall Brennan
committed
apply correct transfroamtion for products searched
1 parent c6c9f17 commit 825a3fe

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private static Map<String, String> createEventMap() {
8080
EVENT_MAPPER.put("Product Added to Wishlist", Event.ADD_TO_WISHLIST);
8181
EVENT_MAPPER.put("Product Shared", Event.SHARE);
8282
EVENT_MAPPER.put("Product Clicked", Event.SELECT_CONTENT);
83-
EVENT_MAPPER.put("Product Searched", Event.SEARCH);
83+
EVENT_MAPPER.put("Products Searched", Event.SEARCH);
8484
return EVENT_MAPPER;
8585
}
8686

src/test/java/com/segment/analytics/android/integration/firebase/FirebaseTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ public void trackWithEventNameTransformation() {
147147
verify(firebase).logEvent(eq("foo_bar"), bundleEq(expected));
148148
}
149149

150+
@Test
151+
public void productsSearchedTransformation() {
152+
integration.track(new TrackPayload.Builder().anonymousId("12345").event("Products Searched").build());
153+
verify(firebase).logEvent(eq("search"), bundleEq(new Bundle()));
154+
}
155+
150156
@Test
151157
public void trackScreenWithName() {
152158
final Activity activity = PowerMockito.mock(Activity.class);

0 commit comments

Comments
 (0)