File tree Expand file tree Collapse file tree
libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,24 +229,12 @@ class PushMessagingTest {
229229 fun testInvokeServerNotificationActionViaSdkManager_WithoutAccount () {
230230 val salesforceSdkManager = SalesforceSDKManager .getInstance()
231231
232- val restResponse = mockk<RestResponse >()
233- every { restResponse.asString() } returns encodeToString(
234- NotificationsActionsResponseBody .serializer(),
235- NotificationsActionsResponseBody (
236- message = " test_message"
232+ assertThrows(NullPointerException ::class .java) {
233+ salesforceSdkManager.invokeServerNotificationAction(
234+ notificationId = " test_notification_id" ,
235+ actionKey = " test_action_key" ,
237236 )
238- )
239- every { restResponse.isSuccess } returns true
240- val restClient = mockk<RestClient >()
241- every { restClient.sendSync(any()) } returns restResponse
242-
243- val notificationsActionsResponseBody = salesforceSdkManager.invokeServerNotificationAction(
244- notificationId = " test_notification_id" ,
245- actionKey = " test_action_key" ,
246- restClient = restClient
247- )
248-
249- assertNull(notificationsActionsResponseBody)
237+ }
250238 }
251239
252240 @Test
You can’t perform that action at this time.
0 commit comments