Skip to content

Commit

Permalink
Update OfflineFirstTopicsRepositoryTest.kt
Browse files Browse the repository at this point in the history
Improve the unit test to do meaning comparisons instead of just comparing two empty lists.
  • Loading branch information
eyhgpt authored Jan 7, 2025
1 parent b89e331 commit b651b2e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class OfflineFirstTopicsRepositoryTest {
@Test
fun offlineFirstTopicsRepository_topics_stream_is_backed_by_topics_dao() =
testScope.runTest {
// After sync, topicDao.getTopicEntities().first() and subject.getTopics().first()
// will return non-empty lists.
subject.syncWith(synchronizer)

assertEquals(
topicDao.getTopicEntities()
.first()
Expand Down

0 comments on commit b651b2e

Please sign in to comment.