Skip to content

Commit

Permalink
🎨 Adjust to coding convention
Browse files Browse the repository at this point in the history
  • Loading branch information
paul2126 committed Nov 3, 2023
1 parent 10328d3 commit 7cd6fad
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ class AuthTokenRemoteSourceTest {
}

@Test
fun `should return response with error when request is invalid for login`(): Unit = runBlocking {
val request = AuthLoginRequest(email = "[email protected]", password = "password123")
val expectedResponse = Response.error<AuthTokenDto>(400, errorResponseBody)
coEvery { authService.login(request) } returns expectedResponse
fun `should return response with error when request is invalid for login`(): Unit =
runBlocking {
val request = AuthLoginRequest(email = "[email protected]", password = "password123")
val expectedResponse = Response.error<AuthTokenDto>(400, errorResponseBody)
coEvery { authService.login(request) } returns expectedResponse

val result = authTokenRemoteSource.loginAuthToken(request).first()
val result = authTokenRemoteSource.loginAuthToken(request).first()

assertEquals(expectedResponse, result)
coVerify(exactly = 1) { authService.login(request) }
}
assertEquals(expectedResponse, result)
coVerify(exactly = 1) { authService.login(request) }
}

@Test
fun `should return response with error when request is invalid`(): Unit = runBlocking {
Expand Down

0 comments on commit 7cd6fad

Please sign in to comment.