@@ -2152,7 +2152,6 @@ public void testOneSignalMethodsBeforeInit() throws Exception {
2152
2152
2153
2153
//queue up a bunch of actions and check that the queue gains size before init
2154
2154
// ----- START QUEUE ------
2155
- OneSignal .syncHashedEmail ("test@test.com" );
2156
2155
2157
2156
for (int a = 0 ; a < 500 ; a ++) {
2158
2157
OneSignal .sendTag ("a" + a , String .valueOf (a ));
@@ -2176,8 +2175,8 @@ public void tagsAvailable(JSONObject tags) {
2176
2175
2177
2176
// ----- END QUEUE ------
2178
2177
2179
- // There should be 502 pending operations in the queue
2180
- assertEquals (502 , OneSignal_taskQueueWaitingForInit ().size ());
2178
+ // There should be 501 pending operations in the queue
2179
+ assertEquals (501 , OneSignal_taskQueueWaitingForInit ().size ());
2181
2180
2182
2181
OneSignalInit (); //starts the pending tasks executor
2183
2182
@@ -2188,7 +2187,6 @@ public void tagsAvailable(JSONObject tags) {
2188
2187
OneSignal .sendTag ("a497" ,"3" );
2189
2188
OneSignal .sendTag ("a496" ,"2" );
2190
2189
OneSignal .sendTag ("a495" ,"1" );
2191
- OneSignal .syncHashedEmail ("test1@test.com" );
2192
2190
2193
2191
OneSignal .getTags (new OneSignal .OSGetTagsHandler () {
2194
2192
@ Override
@@ -2220,10 +2218,6 @@ public void tagsAvailable(JSONObject tags) {
2220
2218
//Assert that the queued up operations ran in correct order
2221
2219
// and that the correct user state was POSTed and synced
2222
2220
2223
- //assert the hashed email which should be test1@test.com, NOT test@test.com
2224
- assertEquals ("94fba03762323f286d7c3ca9e001c541" , ShadowOneSignalRestClient .lastPost .getString ("em_m" ));
2225
- assertEquals ("c31ddeb0a3d6cc32d82b494336d9f27444904fd7" , ShadowOneSignalRestClient .lastPost .getString ("em_s" ));
2226
-
2227
2221
assertNotNull (ShadowOneSignalRestClient .lastPost .getJSONObject ("tags" ));
2228
2222
2229
2223
JSONObject tags = ShadowOneSignalRestClient .lastPost .getJSONObject ("tags" );
@@ -2252,8 +2246,6 @@ public void testOneSignalEmptyPendingTaskQueue() throws Exception {
2252
2246
2253
2247
OneSignalInit (); //starts the pending tasks executor
2254
2248
2255
- OneSignal .syncHashedEmail ("test@test.com" );
2256
-
2257
2249
for (int a = 0 ; a < 5 ; a ++)
2258
2250
OneSignal .sendTag ("a" + a , String .valueOf (a ));
2259
2251
@@ -2265,10 +2257,6 @@ public void testOneSignalEmptyPendingTaskQueue() throws Exception {
2265
2257
//Assert that the queued up operations ran in correct order
2266
2258
// and that the correct user state was POSTed and synced
2267
2259
2268
- //assert the hashed email which should be test1@test.com, NOT test@test.com
2269
- assertEquals ("b642b4217b34b1e8d3bd915fc65c4452" , ShadowOneSignalRestClient .lastPost .getString ("em_m" ));
2270
- assertEquals ("a6ad00ac113a19d953efb91820d8788e2263b28a" , ShadowOneSignalRestClient .lastPost .getString ("em_s" ));
2271
-
2272
2260
assertNotNull (ShadowOneSignalRestClient .lastPost .getJSONObject ("tags" ));
2273
2261
2274
2262
JSONObject tags = ShadowOneSignalRestClient .lastPost .getJSONObject ("tags" );
@@ -2965,40 +2953,6 @@ public void getTagsDelayedAfterRegistering() throws Exception {
2965
2953
assertTrue (ShadowOneSignalRestClient .lastUrl .contains (ShadowOneSignalRestClient .pushUserId ));
2966
2954
}
2967
2955
2968
-
2969
- @ Test
2970
- public void syncHashedEmailTest () throws Exception {
2971
- OneSignalInit ();
2972
- // Casing should be forced to lower.
2973
- OneSignal .syncHashedEmail ("Test@tEst.CoM" );
2974
- threadAndTaskWait ();
2975
- assertEquals ("b642b4217b34b1e8d3bd915fc65c4452" ,ShadowOneSignalRestClient .lastPost .getString ("em_m" ));
2976
- assertEquals ("a6ad00ac113a19d953efb91820d8788e2263b28a" ,ShadowOneSignalRestClient .lastPost .getString ("em_s" ));
2977
-
2978
- // Test email update
2979
- ShadowOneSignalRestClient .lastPost = null ;
2980
- OneSignal .syncHashedEmail ("test@test2.com" );
2981
- threadAndTaskWait ();
2982
- assertEquals ("3e1163777d25d2b935057c3ae393efee" ,ShadowOneSignalRestClient .lastPost .getString ("em_m" ));
2983
- assertEquals ("69e9ca5af84bc88bc185136cd6f782ee889be5c8" ,ShadowOneSignalRestClient .lastPost .getString ("em_s" ));
2984
-
2985
- // Test trim on email
2986
- ShadowOneSignalRestClient .lastPost = null ;
2987
- OneSignal .syncHashedEmail (" test@test2.com " );
2988
- threadAndTaskWait ();
2989
- assertNull (ShadowOneSignalRestClient .lastPost );
2990
-
2991
- // Test invalid email.
2992
- OneSignal .syncHashedEmail ("aaaaaa" );
2993
- threadAndTaskWait ();
2994
- assertNull (ShadowOneSignalRestClient .lastPost );
2995
-
2996
- // Test invalid email.
2997
- OneSignal .syncHashedEmail (null );
2998
- threadAndTaskWait ();
2999
- assertNull (ShadowOneSignalRestClient .lastPost );
3000
- }
3001
-
3002
2956
// ####### on_focus Tests ########
3003
2957
3004
2958
@ Test
0 commit comments