Skip to content

Commit 29e0b80

Browse files
committed
update broken tests
1 parent 427a9cc commit 29e0b80

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/commonTest/kotlin/com.adamratzman/spotify/priv/ClientPlaylistApiTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ClientPlaylistApiTest : AbstractTest<SpotifyClientApi>() {
127127

128128
api!!.playlists.uploadClientPlaylistCover(
129129
createdPlaylist!!.id,
130-
imageUrl = "http://www.personal.psu.edu/kbl5192/jpg.jpg"
130+
imageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/240px-Cat03.jpg"
131131
)
132132

133133
var updatedPlaylist = api!!.playlists.getClientPlaylist(createdPlaylist!!.id)!!

src/commonTest/kotlin/com.adamratzman/spotify/pub/BrowseApiTest.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ class BrowseApiTest : AbstractTest<GenericSpotifyApi>() {
4747
return runBlockingTest {
4848
super.build<GenericSpotifyApi>()
4949
if (!testPrereq()) return@runBlockingTest else api!!
50-
assertNotNull(api!!.browse.getCategory("pop"))
51-
assertNotNull(api!!.browse.getCategory("pop", Market.FR))
52-
assertNotNull(api!!.browse.getCategory("pop", Market.FR, locale = Locale.en_US))
53-
assertNotNull(api!!.browse.getCategory("pop", Market.FR, locale = Locale.sr_ME))
50+
val firstCategoryId = api!!.browse.getCategoryList(limit = 1, market = Market.FR).first()!!.id
51+
assertNotNull(api!!.browse.getCategory(firstCategoryId))
52+
assertNotNull(api!!.browse.getCategory(firstCategoryId, Market.FR))
53+
assertNotNull(api!!.browse.getCategory(firstCategoryId, Market.FR, locale = Locale.en_US))
54+
assertNotNull(api!!.browse.getCategory(firstCategoryId, Market.FR, locale = Locale.sr_ME))
5455
assertFailsWith<SpotifyException.BadRequestException> { api!!.browse.getCategory("no u", Market.US) }
5556
}
5657
}
@@ -66,7 +67,7 @@ class BrowseApiTest : AbstractTest<GenericSpotifyApi>() {
6667
limit = 4
6768
)
6869
}
69-
assertTrue(api!!.browse.getPlaylistsForCategory("pop", 10, 0, Market.FR).items.isNotEmpty())
70+
assertTrue(api!!.browse.getPlaylistsForCategory(api!!.browse.getCategoryList(limit = 1).first()!!.id, 10, 0, Market.FR).items.isNotEmpty())
7071
}
7172
}
7273

0 commit comments

Comments
 (0)