Skip to content

Commit 1a77cea

Browse files
committed
fix: remove .Companion as this is unnecessary
1 parent 3ce509f commit 1a77cea

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/kotlin/com/ctrlhub/core/auth/AuthRouterTest.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ class AuthRouterTest {
1616

1717
@Test
1818
fun `test initiate auth success`() {
19-
val mockEngine = MockEngine.Companion { request ->
19+
val mockEngine = MockEngine { request ->
2020
respond(
2121
content = ByteReadChannel("""{"id": "test-123"}"""),
22-
status = HttpStatusCode.Companion.OK,
22+
status = HttpStatusCode.OK,
2323
headers = headersOf(HttpHeaders.ContentType, "application/json")
2424
)
2525
}
2626

2727
val authRouter = AuthRouter(
28-
apiClient = KtorApiClient.Companion.create(HttpClient(mockEngine))
28+
apiClient = KtorApiClient.create(HttpClient(mockEngine))
2929
)
3030

3131
runBlocking {
@@ -36,16 +36,16 @@ class AuthRouterTest {
3636

3737
@Test
3838
fun `test exception thrown when auth initiate fails`() {
39-
val mockEngine = MockEngine.Companion { request ->
39+
val mockEngine = MockEngine { request ->
4040
respond(
4141
content = ByteReadChannel("""{}"""),
42-
status = HttpStatusCode.Companion.InternalServerError,
42+
status = HttpStatusCode.InternalServerError,
4343
headers = headersOf(HttpHeaders.ContentType, "application/json")
4444
)
4545
}
4646

4747
val authRouter = AuthRouter(
48-
apiClient = KtorApiClient.Companion.create(HttpClient(mockEngine))
48+
apiClient = KtorApiClient.create(HttpClient(mockEngine))
4949
)
5050

5151
runBlocking {
@@ -57,16 +57,16 @@ class AuthRouterTest {
5757

5858
@Test
5959
fun `test can complete auth successfully`() {
60-
val mockEngine = MockEngine.Companion { request ->
60+
val mockEngine = MockEngine { request ->
6161
respond(
6262
content = ByteReadChannel("""{"session_token": "ses-123"}"""),
63-
status = HttpStatusCode.Companion.OK,
63+
status = HttpStatusCode.OK,
6464
headers = headersOf(HttpHeaders.ContentType, "application/json")
6565
)
6666
}
6767

6868
val authRouter = AuthRouter(
69-
apiClient = KtorApiClient.Companion.create(HttpClient(mockEngine))
69+
apiClient = KtorApiClient.create(HttpClient(mockEngine))
7070
)
7171

7272
runBlocking {

src/test/kotlin/com/ctrlhub/core/iam/IamRouterTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class IamRouterTest {
1919
val jsonFilePath = Paths.get("src/test/resources/iam/whoami-response.json")
2020
val jsonContent = Files.readString(jsonFilePath)
2121

22-
val mockEngine = MockEngine.Companion { request ->
22+
val mockEngine = MockEngine { request ->
2323
respond(
2424
content = jsonContent,
2525
status = HttpStatusCode.OK,

0 commit comments

Comments
 (0)