@@ -16,16 +16,16 @@ class AuthRouterTest {
16
16
17
17
@Test
18
18
fun `test initiate auth success` () {
19
- val mockEngine = MockEngine . Companion { request ->
19
+ val mockEngine = MockEngine { request ->
20
20
respond(
21
21
content = ByteReadChannel (""" {"id": "test-123"}""" ),
22
- status = HttpStatusCode .Companion . OK ,
22
+ status = HttpStatusCode .OK ,
23
23
headers = headersOf(HttpHeaders .ContentType , " application/json" )
24
24
)
25
25
}
26
26
27
27
val authRouter = AuthRouter (
28
- apiClient = KtorApiClient .Companion . create(HttpClient (mockEngine))
28
+ apiClient = KtorApiClient .create(HttpClient (mockEngine))
29
29
)
30
30
31
31
runBlocking {
@@ -36,16 +36,16 @@ class AuthRouterTest {
36
36
37
37
@Test
38
38
fun `test exception thrown when auth initiate fails` () {
39
- val mockEngine = MockEngine . Companion { request ->
39
+ val mockEngine = MockEngine { request ->
40
40
respond(
41
41
content = ByteReadChannel (""" {}""" ),
42
- status = HttpStatusCode .Companion . InternalServerError ,
42
+ status = HttpStatusCode .InternalServerError ,
43
43
headers = headersOf(HttpHeaders .ContentType , " application/json" )
44
44
)
45
45
}
46
46
47
47
val authRouter = AuthRouter (
48
- apiClient = KtorApiClient .Companion . create(HttpClient (mockEngine))
48
+ apiClient = KtorApiClient .create(HttpClient (mockEngine))
49
49
)
50
50
51
51
runBlocking {
@@ -57,16 +57,16 @@ class AuthRouterTest {
57
57
58
58
@Test
59
59
fun `test can complete auth successfully` () {
60
- val mockEngine = MockEngine . Companion { request ->
60
+ val mockEngine = MockEngine { request ->
61
61
respond(
62
62
content = ByteReadChannel (""" {"session_token": "ses-123"}""" ),
63
- status = HttpStatusCode .Companion . OK ,
63
+ status = HttpStatusCode .OK ,
64
64
headers = headersOf(HttpHeaders .ContentType , " application/json" )
65
65
)
66
66
}
67
67
68
68
val authRouter = AuthRouter (
69
- apiClient = KtorApiClient .Companion . create(HttpClient (mockEngine))
69
+ apiClient = KtorApiClient .create(HttpClient (mockEngine))
70
70
)
71
71
72
72
runBlocking {
0 commit comments