Add test for push distributor change.
This commit is contained in:
parent
1a6b042978
commit
3ace9aa160
4 changed files with 102 additions and 7 deletions
|
|
@ -25,7 +25,7 @@ class FakePushProvider(
|
|||
override val index: Int = 0,
|
||||
override val name: String = "aFakePushProvider",
|
||||
private val isAvailable: Boolean = true,
|
||||
private val distributors: List<Distributor> = emptyList()
|
||||
private val distributors: List<Distributor> = listOf(Distributor("aDistributorValue", "aDistributorName")),
|
||||
) : PushProvider {
|
||||
override fun isAvailable(): Boolean = isAvailable
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ class FakePushProvider(
|
|||
}
|
||||
|
||||
override suspend fun getCurrentDistributor(matrixClient: MatrixClient): Distributor? {
|
||||
return null
|
||||
return distributors.firstOrNull()
|
||||
}
|
||||
|
||||
override suspend fun unregister(matrixClient: MatrixClient): Result<Unit> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue