Browse Source

Add more tests

pull/2354/head
Benoit Marty 8 months ago committed by Benoit Marty
parent
commit
50859b62de
  1. 29
      features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryTest.kt

29
features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryTest.kt

@ -35,6 +35,35 @@ class RoomListRoomSummaryTest { @@ -35,6 +35,35 @@ class RoomListRoomSummaryTest {
assertThat(sut.hasNewContent).isFalse()
}
@Test
fun `test muted room`() {
val sut = createRoomListRoomSummary(
userDefinedNotificationMode = RoomNotificationMode.MUTE,
)
assertThat(sut.isHighlighted).isFalse()
assertThat(sut.hasNewContent).isFalse()
}
@Test
fun `test muted room isMarkedUnread set to true`() {
val sut = createRoomListRoomSummary(
isMarkedUnread = true,
userDefinedNotificationMode = RoomNotificationMode.MUTE,
)
assertThat(sut.isHighlighted).isTrue()
assertThat(sut.hasNewContent).isTrue()
}
@Test
fun `test muted room with unread message`() {
val sut = createRoomListRoomSummary(
numberOfUnreadNotifications = 1,
userDefinedNotificationMode = RoomNotificationMode.MUTE,
)
assertThat(sut.isHighlighted).isFalse()
assertThat(sut.hasNewContent).isTrue()
}
@Test
fun `test isMarkedUnread set to true`() {
val sut = createRoomListRoomSummary(

Loading…
Cancel
Save