mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
share the artist song ordering and pin it with a test
This commit is contained in:
@@ -2282,6 +2282,19 @@ class PlaybackControllerTest {
|
||||
assertEquals(setOf("a1", "a2", "a3", "b1", "b2"), handle.items.map { it.id }.toSet())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun artistQueueRowsFollowTheFlatShuffleIdOrder() {
|
||||
seedArtist()
|
||||
runBlocking { queues.replace(listOf(queues.artistEntry(1, "ar1"))) }
|
||||
|
||||
val snapshot = runBlocking { queues.snapshot() }
|
||||
val paged = (0 until snapshot.size).map { runBlocking { queues.itemAt(snapshot, it)?.song?.id } }
|
||||
val flat = runBlocking { db.queueDao().artistSongIds(1, "ar1") }
|
||||
|
||||
assertEquals(listOf("b1", "b2", "a1", "a2", "a3"), flat)
|
||||
assertEquals(flat, paged)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun restoringResumesFromTheSavedPosition() {
|
||||
seedAlbum(3, sourceId = 1)
|
||||
|
||||
Reference in New Issue
Block a user