Skip to content

Commit

Permalink
tests: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xitij2000 committed Dec 2, 2024
1 parent 57259d9 commit 7ed0c78
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
viewModel.login("", "")
coVerify(exactly = 0) { interactor.login(any(), any()) }
Expand Down Expand Up @@ -165,7 +166,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
viewModel.login("[email protected]", "")
coVerify(exactly = 0) { interactor.login(any(), any()) }
Expand Down Expand Up @@ -202,7 +204,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
viewModel.login("[email protected]", "")

Expand Down Expand Up @@ -238,7 +241,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
viewModel.login("[email protected]", "ed")

Expand Down Expand Up @@ -278,7 +282,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
coEvery { interactor.login("[email protected]", "edx") } returns Unit
viewModel.login("[email protected]", "edx")
Expand Down Expand Up @@ -318,7 +323,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
coEvery { interactor.login("[email protected]", "edx") } throws UnknownHostException()
viewModel.login("[email protected]", "edx")
Expand Down Expand Up @@ -360,7 +366,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
coEvery { interactor.login("[email protected]", "edx") } throws EdxError.InvalidGrantException()
viewModel.login("[email protected]", "edx")
Expand Down Expand Up @@ -402,7 +409,8 @@ class SignInViewModelTest {
courseId = "",
infoType = "",
calendarInteractor = calendarInteractor,
calendarPreferences = calendarPreferences
calendarPreferences = calendarPreferences,
authCode = "",
)
coEvery { interactor.login("[email protected]", "edx") } throws IllegalStateException()
viewModel.login("[email protected]", "edx")
Expand Down

0 comments on commit 7ed0c78

Please sign in to comment.