File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/commonTest/kotlin/com.adamratzman/spotify/public Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
package com.adamratzman.spotify.public
3
3
4
4
import com.adamratzman.spotify.api
5
- import kotlin.test.assertEquals
6
- import kotlin.test.assertNull
5
+ import com.adamratzman.spotify.utils.catch
7
6
import org.spekframework.spek2.Spek
8
7
import org.spekframework.spek2.style.specification.describe
8
+ import kotlin.test.assertNull
9
+ import kotlin.test.assertTrue
9
10
10
11
class PublicUserAPITest : Spek ({
11
12
describe("Public User test") {
12
13
describe("get user") {
13
14
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 }
15
16
}
16
17
it("unknown user should throw exception") {
17
18
assertNull(api.users.getProfile("non-existant-user").complete())
You can’t perform that action at this time.
0 commit comments