Add more tests
This commit is contained in:
parent
12da93a926
commit
6646b068bd
1 changed files with 29 additions and 0 deletions
|
|
@ -35,6 +35,35 @@ class RoomListRoomSummaryTest {
|
||||||
assertThat(sut.hasNewContent).isFalse()
|
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
|
@Test
|
||||||
fun `test isMarkedUnread set to true`() {
|
fun `test isMarkedUnread set to true`() {
|
||||||
val sut = createRoomListRoomSummary(
|
val sut = createRoomListRoomSummary(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue