Skip to content

Commit

Permalink
Fix CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Apr 10, 2024
1 parent 3fa81c5 commit 1796663
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import androidx.test.platform.app.InstrumentationRegistry
import com.duckduckgo.app.history.store.HistoryDao
import com.duckduckgo.app.history.store.HistoryDatabase
import com.duckduckgo.app.history.store.HistoryEntryEntity
import com.duckduckgo.app.history.store.HistoryEntryWithVisits
import io.reactivex.observers.TestObserver
import org.junit.After
import org.junit.Assert
import org.junit.Before
Expand Down Expand Up @@ -64,10 +62,8 @@ class HistoryDaoTest {
historyDao.updateOrInsertVisit("url", "title", "query", false, 1L)

val historyEntriesWithVisits = historyDao.getHistoryEntriesWithVisits()
val testObserver = TestObserver<List<HistoryEntryWithVisits>>()
historyEntriesWithVisits.subscribe(testObserver)
Assert.assertEquals(1, testObserver.valueCount())
Assert.assertEquals(1, testObserver.values().first().first().visits.count())
Assert.assertEquals(1, historyEntriesWithVisits.count())
Assert.assertEquals(1, historyEntriesWithVisits.first().visits.count())
}

@Test
Expand All @@ -76,9 +72,7 @@ class HistoryDaoTest {
historyDao.updateOrInsertVisit("url", "title", "query", false, 2L)

val historyEntriesWithVisits = historyDao.getHistoryEntriesWithVisits()
val testObserver = TestObserver<List<HistoryEntryWithVisits>>()
historyEntriesWithVisits.subscribe(testObserver)
Assert.assertEquals(1, testObserver.valueCount())
Assert.assertEquals(2, testObserver.values().first().first().visits.count())
Assert.assertEquals(1, historyEntriesWithVisits.count())
Assert.assertEquals(2, historyEntriesWithVisits.first().visits.count())
}
}

0 comments on commit 1796663

Please sign in to comment.