Skip to content

Commit 6d733ef

Browse files
committed
Update testInvokeServerNotificationActionViaSdkManager_WithoutAccount
1 parent 2b196ba commit 6d733ef

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/app/PushMessagingTest.kt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)