forked from github/wulkanowy-mirror
Add workaround password decryption error (#189)
This commit is contained in:

committed by
Mikołaj Pich

parent
11cc85e37c
commit
9a298833f5
@ -140,7 +140,7 @@ class LoginFormPresenterTest {
|
||||
verify(loginFormView).showProgress(false)
|
||||
verify(loginFormView).showContent(false)
|
||||
verify(loginFormView).showContent(true)
|
||||
verify(errorHandler).proceed(testException)
|
||||
verify(errorHandler).dispatch(testException)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class LoginOptionsPresenterTest {
|
||||
doReturn(Single.error<List<Student>>(testException)).`when`(studentRepository).cachedStudents
|
||||
presenter.onParentViewLoadData()
|
||||
verify(loginOptionsView).showActionBar(true)
|
||||
verify(errorHandler).proceed(testException)
|
||||
verify(errorHandler).dispatch(testException)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -85,6 +85,6 @@ class LoginOptionsPresenterTest {
|
||||
presenter.onItemSelected(LoginOptionsItem(testStudent))
|
||||
verify(loginOptionsView).showContent(false)
|
||||
verify(loginOptionsView).showProgress(true)
|
||||
verify(errorHandler).proceed(testException)
|
||||
verify(errorHandler).dispatch(testException)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package io.github.wulkanowy.ui.modules.main
|
||||
|
||||
import io.github.wulkanowy.data.ErrorHandler
|
||||
import io.github.wulkanowy.TestSchedulersProvider
|
||||
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
||||
import io.github.wulkanowy.data.repositories.StudentRepository
|
||||
import io.github.wulkanowy.services.job.ServiceHelper
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
@ -13,7 +14,10 @@ import org.mockito.MockitoAnnotations
|
||||
class MainPresenterTest {
|
||||
|
||||
@Mock
|
||||
lateinit var errorHandler: ErrorHandler
|
||||
lateinit var errorHandler: MainErrorHandler
|
||||
|
||||
@Mock
|
||||
lateinit var studentRepository: StudentRepository
|
||||
|
||||
@Mock
|
||||
lateinit var prefRepository: PreferencesRepository
|
||||
@ -31,7 +35,7 @@ class MainPresenterTest {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
clearInvocations(mainView)
|
||||
|
||||
presenter = MainPresenter(errorHandler, prefRepository, serviceHelper)
|
||||
presenter = MainPresenter(errorHandler, studentRepository, prefRepository, TestSchedulersProvider(), serviceHelper)
|
||||
presenter.onAttachView(mainView, -1)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user