Add more tests
This commit is contained in:
parent
17f23304d0
commit
50859b62de
1 changed files with 29 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue