Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 8315ad1

Browse files
committed
fix AuthApiTest
1 parent 85bb5e2 commit 8315ad1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/src/test/java/com/fictadvisor/android/AuthApiTest.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ package com.fictadvisor.android
22

33
import com.fictadvisor.android.data.dto.ForgotPasswordDTO
44
import com.fictadvisor.android.data.dto.LoginRequest
5-
import com.fictadvisor.android.data.dto.OrdinaryStudentResponse
65
import com.fictadvisor.android.data.dto.RegisterTelegramDTO
76
import com.fictadvisor.android.data.dto.RegistrationDTO
87
import com.fictadvisor.android.data.dto.ResetPasswordDTO
98
import com.fictadvisor.android.data.dto.TelegramDTO
109
import com.fictadvisor.android.data.dto.UpdatePasswordDTO
1110
import com.fictadvisor.android.data.dto.VerificationEmailDTO
1211
import com.fictadvisor.android.data.remote.api.AuthApi
13-
import com.google.gson.Gson
1412
import kotlinx.coroutines.test.runTest
1513
import okhttp3.Interceptor
1614
import okhttp3.OkHttpClient
@@ -198,8 +196,10 @@ class AuthApiTest {
198196
"""{"accessToken": "some_access_token", "refreshToken": "some_refresh_token"}"""
199197
server.enqueue(MockResponse().setBody(responseJson))
200198

199+
val token = "some_token"
200+
201201
val updatePasswordRequest = mock(UpdatePasswordDTO::class.java)
202-
val response = authApi.updatePassword(updatePasswordRequest)
202+
val response = authApi.updatePassword(token, updatePasswordRequest)
203203

204204
assertTrue(response.isSuccessful)
205205
val authResponse = response.body()
@@ -310,7 +310,8 @@ class AuthApiTest {
310310

311311
server.enqueue(MockResponse().setBody(responseJson))
312312

313-
val response = authApi.getStudent()
313+
val token = "some_token"
314+
val response = authApi.getStudent(token)
314315

315316
assertTrue(response.isSuccessful)
316317

0 commit comments

Comments
 (0)