Skip to content

Commit 6826077

Browse files
committed
fix tests for the read message guard
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
1 parent 9c74435 commit 6826077

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/test/java/com/nextcloud/talk/chat/viewmodels/ChatViewModelTest.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ class ChatViewModelTest {
3131
@Test
3232
fun `isPlausibleLastReadMessageId returns true within the buffer above the newest known message id`() {
3333
assertTrue(
34-
ChatViewModel.isPlausibleLastReadMessageId(messageId = 158761 + 2000, newestKnownRealMessageId = 158761L)
34+
ChatViewModel.isPlausibleLastReadMessageId(
35+
messageId = 158761 + 10_000,
36+
newestKnownRealMessageId = 158761L
37+
)
3538
)
3639
}
3740

3841
@Test
3942
fun `isPlausibleLastReadMessageId returns false just beyond the buffer above the newest known message id`() {
4043
assertFalse(
4144
ChatViewModel.isPlausibleLastReadMessageId(
42-
messageId = 158761 + 2000 + 1,
45+
messageId = 158761 + 10_000 + 1,
4346
newestKnownRealMessageId = 158761L
4447
)
4548
)

0 commit comments

Comments
 (0)