File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 39
39
import android .location .Location ;
40
40
import android .net .ConnectivityManager ;
41
41
import android .os .Bundle ;
42
- import android .util .Log ;
43
42
44
43
import androidx .test .core .app .ApplicationProvider ;
45
44
123
122
import java .util .Iterator ;
124
123
import java .util .List ;
125
124
import java .util .Map ;
125
+ import java .util .TimeZone ;
126
126
import java .util .concurrent .ArrayBlockingQueue ;
127
127
import java .util .concurrent .BlockingQueue ;
128
128
import java .util .concurrent .atomic .AtomicBoolean ;
@@ -877,6 +877,17 @@ public void testOnSessionCalledOnlyOncePer30Sec() throws Exception {
877
877
assertEquals ("{\" app_id\" :\" b4f7f966-d8cc-11e4-bed1-df8f05be55ba\" }" , ShadowOneSignalRestClient .lastPost .toString ());
878
878
}
879
879
880
+ @ Test
881
+ public void testRequestMadeWithCorrectTimeZoneID () throws Exception {
882
+ // Will call create
883
+ TimeZone .setDefault (TimeZone .getTimeZone ("Europe/London" ));
884
+ OneSignalInit ();
885
+ threadAndTaskWait ();
886
+ ShadowOneSignalRestClient .lastUrl = null ;
887
+ JSONObject jsonObject = new JSONObject (ShadowOneSignalRestClient .lastPost .toString ());
888
+ assertEquals ("Europe/London" , jsonObject .get ("timezone_id" ));
889
+ }
890
+
880
891
@ Test
881
892
public void testAlwaysUseRemoteProjectNumberOverLocal () throws Exception {
882
893
OneSignalInit ();
You can’t perform that action at this time.
0 commit comments