Add missing test for SecureBackupEnablePresenter
This commit is contained in:
parent
315cc1fd9d
commit
35baaa6209
2 changed files with 28 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue