Skip to content

Commit 43cd2b2

Browse files
Modifications requested to test
1 parent 636bace commit 43cd2b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OneSignalSDK/unittest/src/test/java/com/test/onesignal/MainOneSignalClassRunner.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public class MainOneSignalClassRunner {
195195

196196
private static final String ONESIGNAL_APP_ID = "b4f7f966-d8cc-11e4-bed1-df8f05be55ba";
197197
private static final String ONESIGNAL_NOTIFICATION_ID = "97d8e764-81c2-49b0-a644-713d052ae7d5";
198+
private static final String TIMEZONE_ID = "Europe/London";
198199

199200
@SuppressLint("StaticFieldLeak")
200201
private static Activity blankActivity;
@@ -879,13 +880,12 @@ public void testOnSessionCalledOnlyOncePer30Sec() throws Exception {
879880

880881
@Test
881882
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));
884885
OneSignalInit();
885886
threadAndTaskWait();
886-
ShadowOneSignalRestClient.lastUrl = null;
887887
JSONObject jsonObject = new JSONObject(ShadowOneSignalRestClient.lastPost.toString());
888-
assertEquals("Europe/London", jsonObject.get("timezone_id"));
888+
assertEquals(TIMEZONE_ID, jsonObject.get("timezone_id"));
889889
}
890890

891891
@Test

0 commit comments

Comments
 (0)