Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test failure by updating expected pre-populated messsge count to 1 #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AppDatabaseTest {
for (detail in chatDetails) {
assertThat(detail.attendees).hasSize(1)
val messages = db.messageDao().loadAll(detail.chatWithLastMessage.id)
assertThat(messages).hasSize(2)
assertThat(messages).hasSize(1)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChatDaoTest {
for (detail in chatDetails) {
assertThat(detail.attendees).hasSize(1)
val messages = db.messageDao().loadAll(detail.chatWithLastMessage.id)
assertThat(messages).hasSize(2)
assertThat(messages).hasSize(1)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ChatRepositoryTest {
fun findMessages() = runTest {
val repository = createTestRepository()
repository.findMessages(1L).test {
assertThat(awaitItem()).hasSize(2)
assertThat(awaitItem()).hasSize(1)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ChatViewModelTest {
assertThat(awaitNotNull().firstContact.name).isEqualTo("Cat")
}
viewModel.messages.test {
assertThat(awaitNotEmpty()).hasSize(2)
assertThat(awaitNotEmpty()).hasSize(1)
}
}
}