1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 08:30:44 +00:00

Ensure order of search history entries in tests

This commit is contained in:
XiangRongLin 2022-01-18 18:36:43 +01:00
parent 15e3b6301c
commit 4a7cfd1a6c

View File

@ -53,11 +53,12 @@ class HistoryRecordManagerTest {
@Test
fun deleteSearchHistory() {
val now = OffsetDateTime.now()
val entries = listOf(
SearchHistoryEntry(OffsetDateTime.now(), 0, "A"),
SearchHistoryEntry(OffsetDateTime.now(), 2, "A"),
SearchHistoryEntry(OffsetDateTime.now(), 1, "B"),
SearchHistoryEntry(OffsetDateTime.now(), 0, "B"),
SearchHistoryEntry(now.minusSeconds(1), 0, "A"),
SearchHistoryEntry(now.minusSeconds(2), 2, "A"),
SearchHistoryEntry(now.minusSeconds(3), 1, "B"),
SearchHistoryEntry(now.minusSeconds(4), 0, "B"),
)
// make sure all 4 were inserted