Skip to content

Commit 138afa2

Browse files
authored
Merge pull request #33 from segment-integrations/niall/products_searched
Apply correct transformation for Products Searched event
2 parents c6c9f17 + 825a3fe commit 138afa2

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

+1-1
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

+6
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)