mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
queue the whole starred list from both starred song lists
This commit is contained in:
@@ -316,6 +316,25 @@ class LibraryHomeDaoTest {
|
||||
assertEquals("cover-1", page.first().coverArt)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun starredSongIdsMatchTheDisplayedOrderSoTheStartTrackIsRight() =
|
||||
runTest {
|
||||
val sourceId = source()
|
||||
val dao = db.libraryDao()
|
||||
dao.upsertSongs(
|
||||
listOf(
|
||||
song(sourceId, "s1", "First", starred = 100),
|
||||
song(sourceId, "s2", "Second", starred = 300),
|
||||
song(sourceId, "s3", "Third", starred = null),
|
||||
song(sourceId, "s4", "Fourth", starred = 200),
|
||||
),
|
||||
)
|
||||
|
||||
val displayed = dao.starredSongs(sourceId).page().map { it.song.id }
|
||||
assertEquals(listOf("s2", "s4", "s1"), displayed)
|
||||
assertEquals(displayed, dao.starredSongIds(sourceId))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun songsByGenrePagingFiltersAndJoinsAlbumCoverArt() =
|
||||
runTest {
|
||||
|
||||
Reference in New Issue
Block a user