Skip to content

Commit f362895

Browse files
committed
Fix nextSuccessfulRegistrationResponse
* Fix issue where nextSuccessfulRegistrationResponse could be used for other types of POST requests which should only be limited to players. * This fixes some flacky tests with InAppMessageIntegrationTests as the response was used for impressions and was discarded.
1 parent 52bb3c5 commit f362895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ private static void mockPost(String url, JSONObject jsonBody, OneSignalRestClien
311311

312312
String retJson;
313313

314-
if (nextSuccessfulRegistrationResponse != null) {
314+
if (nextSuccessfulRegistrationResponse != null && url.contains("players")) {
315315
retJson = nextSuccessfulRegistrationResponse;
316316
nextSuccessfulRegistrationResponse = null;
317317
}

0 commit comments

Comments
 (0)