File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
src/commonTest/kotlin/net/pearx/kpastebin/test Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,29 @@ class InvalidUserKeyTest {
27
27
assertFailsWith<InvalidUserKeyException > {
28
28
createClient(userKey = " invalid" ).listPastes()
29
29
}
30
+ assertFailsWith<InvalidUserKeyException > {
31
+ createClient().listPastes()
32
+ }
30
33
}
31
34
32
35
@Test
33
36
fun deletingPaste () = runTest {
34
37
assertFailsWith<InvalidUserKeyException > {
35
38
createClient(userKey = " invalid" ).deletePaste(pastes.keys.first())
36
39
}
40
+ assertFailsWith<InvalidUserKeyException > {
41
+ createClient().deletePaste(pastes.keys.first())
42
+ }
37
43
}
38
44
39
45
@Test
40
46
fun gettingUserDetails () = runTest {
41
47
assertFailsWith<InvalidUserKeyException > {
42
48
createClient(userKey = " invalid" ).getUserDetails()
43
49
}
50
+ assertFailsWith<InvalidUserKeyException > {
51
+ createClient().getUserDetails()
52
+ }
44
53
}
45
54
46
55
@Test
Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ package net.pearx.kpastebin.test
9
9
10
10
import net.pearx.kpastebin.PasteNotFoundException
11
11
import net.pearx.kpastebin.model.*
12
- import net.pearx.kpastebin.test.helper.createClient
13
- import net.pearx.kpastebin.test.helper.globalUserKey
14
- import net.pearx.kpastebin.test.helper.pastes
15
- import net.pearx.kpastebin.test.helper.runTest
12
+ import net.pearx.kpastebin.test.helper.*
16
13
import kotlin.test.Test
17
14
import kotlin.test.assertEquals
18
15
import kotlin.test.assertFailsWith
@@ -104,4 +101,9 @@ class LoggedInTest {
104
101
assertEquals(text, createClient(userKey = globalUserKey).getPaste(key))
105
102
}
106
103
}
104
+
105
+ @Test
106
+ fun gettingPastesEmpty () = runTest {
107
+ assertEquals(listOf (), createClient(userKey = emptyPastesUserKey).listPastes())
108
+ }
107
109
}
You can’t perform that action at this time.
0 commit comments