mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Pin : clean up after PR review #2692
This commit is contained in:
+10
-2
@@ -144,7 +144,9 @@ class LogoutPresenterTest {
|
||||
@Test
|
||||
fun `present - logout with error then cancel`() = runTest {
|
||||
val matrixClient = FakeMatrixClient().apply {
|
||||
givenLogoutError(A_THROWABLE)
|
||||
logoutLambda = { _ ->
|
||||
throw A_THROWABLE
|
||||
}
|
||||
}
|
||||
val presenter = createLogoutPresenter(
|
||||
matrixClient,
|
||||
@@ -170,7 +172,13 @@ class LogoutPresenterTest {
|
||||
@Test
|
||||
fun `present - logout with error then force`() = runTest {
|
||||
val matrixClient = FakeMatrixClient().apply {
|
||||
givenLogoutError(A_THROWABLE)
|
||||
logoutLambda = { ignoreSdkError ->
|
||||
if (!ignoreSdkError) {
|
||||
throw A_THROWABLE
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
val presenter = createLogoutPresenter(
|
||||
matrixClient,
|
||||
|
||||
+10
-2
@@ -125,7 +125,9 @@ class DefaultDirectLogoutPresenterTest {
|
||||
@Test
|
||||
fun `present - logout with error then cancel`() = runTest {
|
||||
val matrixClient = FakeMatrixClient().apply {
|
||||
givenLogoutError(A_THROWABLE)
|
||||
logoutLambda = { _ ->
|
||||
throw A_THROWABLE
|
||||
}
|
||||
}
|
||||
val presenter = createDefaultDirectLogoutPresenter(
|
||||
matrixClient,
|
||||
@@ -151,7 +153,13 @@ class DefaultDirectLogoutPresenterTest {
|
||||
@Test
|
||||
fun `present - logout with error then force`() = runTest {
|
||||
val matrixClient = FakeMatrixClient().apply {
|
||||
givenLogoutError(A_THROWABLE)
|
||||
logoutLambda = { ignoreSdkError ->
|
||||
if (!ignoreSdkError) {
|
||||
throw A_THROWABLE
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
val presenter = createDefaultDirectLogoutPresenter(
|
||||
matrixClient,
|
||||
|
||||
Reference in New Issue
Block a user