Add test for UnableToResolve case.

This commit is contained in:
Benoit Marty
2025-06-18 14:30:44 +02:00
parent af68176dbe
commit fde4fe871f

View File

@@ -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(
notificationClient: NotificationClient = FakeFfiNotificationClient(),
clock: SystemClock = FakeSystemClock(),