Skip to content

Commit 92b6d15

Browse files
committed
fix public user api test (followers changed)
1 parent e71b124 commit 92b6d15

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/commonTest/kotlin/com.adamratzman/spotify/public/PublicUserAPITest.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
package com.adamratzman.spotify.public
33

44
import com.adamratzman.spotify.api
5-
import kotlin.test.assertEquals
6-
import kotlin.test.assertNull
5+
import com.adamratzman.spotify.utils.catch
76
import org.spekframework.spek2.Spek
87
import org.spekframework.spek2.style.specification.describe
8+
import kotlin.test.assertNull
9+
import kotlin.test.assertTrue
910

1011
class PublicUserAPITest : Spek({
1112
describe("Public User test") {
1213
describe("get user") {
1314
it("available user should return author name") {
14-
assertEquals(0, api.users.getProfile("adamratzman1").complete()!!.followers.total)
15+
assertTrue { catch { api.users.getProfile("adamratzman1").complete()!!.followers.total } != null }
1516
}
1617
it("unknown user should throw exception") {
1718
assertNull(api.users.getProfile("non-existant-user").complete())

0 commit comments

Comments
 (0)