Add test for UnableToResolve case.
This commit is contained in:
parent
c5f7546b50
commit
488932c4e3
1 changed files with 14 additions and 0 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue