File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ public class MainOneSignalClassRunner {
195
195
196
196
private static final String ONESIGNAL_APP_ID = "b4f7f966-d8cc-11e4-bed1-df8f05be55ba" ;
197
197
private static final String ONESIGNAL_NOTIFICATION_ID = "97d8e764-81c2-49b0-a644-713d052ae7d5" ;
198
+ private static final String TIMEZONE_ID = "Europe/London" ;
198
199
199
200
@ SuppressLint ("StaticFieldLeak" )
200
201
private static Activity blankActivity ;
@@ -879,13 +880,12 @@ public void testOnSessionCalledOnlyOncePer30Sec() throws Exception {
879
880
880
881
@ Test
881
882
public void testRequestMadeWithCorrectTimeZoneID () throws Exception {
882
- // Will call create
883
- TimeZone .setDefault (TimeZone .getTimeZone ("Europe/London" ));
883
+ //Sets Default timezone and initalizes onesignal
884
+ TimeZone .setDefault (TimeZone .getTimeZone (TIMEZONE_ID ));
884
885
OneSignalInit ();
885
886
threadAndTaskWait ();
886
- ShadowOneSignalRestClient .lastUrl = null ;
887
887
JSONObject jsonObject = new JSONObject (ShadowOneSignalRestClient .lastPost .toString ());
888
- assertEquals ("Europe/London" , jsonObject .get ("timezone_id" ));
888
+ assertEquals (TIMEZONE_ID , jsonObject .get ("timezone_id" ));
889
889
}
890
890
891
891
@ Test
You can’t perform that action at this time.
0 commit comments