Pin : clean up after PR review #2692

This commit is contained in:
ganfra
2024-05-20 16:01:52 +02:00
parent efc0a36ffa
commit 73905fa695
18 changed files with 155 additions and 68 deletions
@@ -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,
@@ -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,