File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,23 @@ public void testDeviceTypeIsAndroid_forPlayerCreate() throws Exception {
314
314
assertAndroidPlayerCreateAtIndex (1 );
315
315
}
316
316
317
+ @ Test
318
+ public void testAndroidDoesNotGetAdId () throws Exception {
319
+ // 2. Init OneSignal so the app id is cached
320
+ OneSignalInit ();
321
+ threadAndTaskWait ();
322
+
323
+ // 3. Make sure device_type is Amazon (2) in player create
324
+ assertAndroidPlayerCreateAtIndex (1 );
325
+
326
+ // 4. Assert Player Create does NOT have an ad_id
327
+ ShadowOneSignalRestClient .Request request = ShadowOneSignalRestClient .requests .get (1 );
328
+ JsonAsserts .doesNotContainKeys (request .payload , new ArrayList <String >() {{ add ("ad_id" ); }});
329
+
330
+ // 5. Assert we did NOT try to get a Google Ad id
331
+ assertFalse (ShadowAdvertisingIdProviderGPS .calledGetIdentifier );
332
+ }
333
+
317
334
@ Test
318
335
public void testDeviceTypeIsAmazon_forPlayerCreate () throws Exception {
319
336
// 1. Mock Amazon device type for this test
You can’t perform that action at this time.
0 commit comments