Skip to content

Commit 488932c

Browse files
committed
Add test for UnableToResolve case.
1 parent c5f7546 commit 488932c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationServiceTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ class RustNotificationServiceTest {
4747
)
4848
}
4949

50+
@Test
51+
fun `test unable to resolve event`() = runTest {
52+
val notificationClient = FakeFfiNotificationClient(
53+
notificationItemResult = emptyMap(),
54+
)
55+
val sut = createRustNotificationService(
56+
notificationClient = notificationClient,
57+
)
58+
val result = sut.getNotifications(mapOf(A_ROOM_ID to listOf(AN_EVENT_ID))).getOrThrow()[AN_EVENT_ID]!!
59+
assertThat(result.content).isEqualTo(
60+
NotificationContent.MessageLike.UnableToResolve
61+
)
62+
}
63+
5064
private fun TestScope.createRustNotificationService(
5165
notificationClient: NotificationClient = FakeFfiNotificationClient(),
5266
clock: SystemClock = FakeSystemClock(),

0 commit comments

Comments
 (0)