File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1130,6 +1130,21 @@ public void shouldSetButtonsCorrectly() throws Exception {
1130
1130
assertEquals ("id1" , new JSONObject (json_data ).optString (BUNDLE_KEY_ACTION_ID ));
1131
1131
}
1132
1132
1133
+ @ Test
1134
+ @ Config (sdk = 23 , shadows = { ShadowGenerateNotification .class })
1135
+ public void shouldUseCorrectActivityForAndroid23Plus () throws Exception {
1136
+ NotificationBundleProcessor_ProcessFromFCMIntentService (blankActivity , getBaseNotifBundle ());
1137
+ threadAndTaskWait ();
1138
+
1139
+ Intent [] intents = lastNotificationIntents ();
1140
+ assertEquals ("android.intent.action.MAIN" , intents [0 ].getAction ());
1141
+ assertEquals (
1142
+ com .onesignal .NotificationOpenedReceiver .class .getName (),
1143
+ intents [1 ].getComponent ().getClassName ()
1144
+ );
1145
+ assertEquals (2 , intents .length );
1146
+ }
1147
+
1133
1148
@ Test
1134
1149
@ Config (shadows = { ShadowGenerateNotification .class })
1135
1150
public void shouldSetContentIntentForLaunchURL () throws Exception {
You can’t perform that action at this time.
0 commit comments