mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Add test for UnableToResolve case.
This commit is contained in:
+14
@@ -47,6 +47,20 @@ class RustNotificationServiceTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `test unable to resolve event`() = runTest {
|
||||||
|
val notificationClient = FakeFfiNotificationClient(
|
||||||
|
notificationItemResult = emptyMap(),
|
||||||
|
)
|
||||||
|
val sut = createRustNotificationService(
|
||||||
|
notificationClient = notificationClient,
|
||||||
|
)
|
||||||
|
val result = sut.getNotifications(mapOf(A_ROOM_ID to listOf(AN_EVENT_ID))).getOrThrow()[AN_EVENT_ID]!!
|
||||||
|
assertThat(result.content).isEqualTo(
|
||||||
|
NotificationContent.MessageLike.UnableToResolve
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
private fun TestScope.createRustNotificationService(
|
private fun TestScope.createRustNotificationService(
|
||||||
notificationClient: NotificationClient = FakeFfiNotificationClient(),
|
notificationClient: NotificationClient = FakeFfiNotificationClient(),
|
||||||
clock: SystemClock = FakeSystemClock(),
|
clock: SystemClock = FakeSystemClock(),
|
||||||
|
|||||||
Reference in New Issue
Block a user