mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add missing test for SecureBackupEnablePresenter
This commit is contained in:
+7
@@ -36,7 +36,14 @@ class FakeEncryptionService : EncryptionService {
|
||||
private var recoverFailure: Exception? = null
|
||||
private var doesBackupExistOnServerResult: Result<Boolean> = Result.success(true)
|
||||
|
||||
private var enableBackupsFailure: Exception? = null
|
||||
|
||||
fun givenEnableBackupsFailure(exception: Exception?) {
|
||||
enableBackupsFailure = exception
|
||||
}
|
||||
|
||||
override suspend fun enableBackups(): Result<Unit> = simulateLongTask {
|
||||
enableBackupsFailure?.let { return Result.failure(it) }
|
||||
return Result.success(Unit)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user