mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Add more tests
This commit is contained in:
committed by
Benoit Marty
parent
17f23304d0
commit
50859b62de
+29
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user