Clean up
This commit is contained in:
parent
5b8c0871e8
commit
955b4308ce
2 changed files with 3 additions and 2 deletions
|
|
@ -82,7 +82,7 @@ class DefaultFirebaseNewTokenHandlerTest {
|
||||||
A_USER_ID -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
|
A_USER_ID -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
|
||||||
A_USER_ID_2 -> FakeUserPushStore(pushProviderName = "Other")
|
A_USER_ID_2 -> FakeUserPushStore(pushProviderName = "Other")
|
||||||
A_USER_ID_3 -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
|
A_USER_ID_3 -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
|
||||||
else -> throw IllegalStateException()
|
else -> error("Unexpected sessionId: $sessionId")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
package io.element.android.libraries.pushproviders.unifiedpush
|
package io.element.android.libraries.pushproviders.unifiedpush
|
||||||
|
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
|
import io.element.android.libraries.matrix.test.AN_EXCEPTION
|
||||||
import io.element.android.libraries.pushproviders.unifiedpush.network.DiscoveryResponse
|
import io.element.android.libraries.pushproviders.unifiedpush.network.DiscoveryResponse
|
||||||
import io.element.android.libraries.pushproviders.unifiedpush.network.DiscoveryUnifiedPush
|
import io.element.android.libraries.pushproviders.unifiedpush.network.DiscoveryUnifiedPush
|
||||||
import io.element.android.tests.testutils.testCoroutineDispatchers
|
import io.element.android.tests.testutils.testCoroutineDispatchers
|
||||||
|
|
@ -96,7 +97,7 @@ class DefaultUnifiedPushGatewayResolverTest {
|
||||||
@Test
|
@Test
|
||||||
fun `when a custom url is not reachable, the default url is returned`() = runTest {
|
fun `when a custom url is not reachable, the default url is returned`() = runTest {
|
||||||
val unifiedPushApiFactory = FakeUnifiedPushApiFactory(
|
val unifiedPushApiFactory = FakeUnifiedPushApiFactory(
|
||||||
discoveryResponse = { throw Exception() }
|
discoveryResponse = { throw AN_EXCEPTION }
|
||||||
)
|
)
|
||||||
val sut = createDefaultUnifiedPushGatewayResolver(
|
val sut = createDefaultUnifiedPushGatewayResolver(
|
||||||
unifiedPushApiFactory = unifiedPushApiFactory
|
unifiedPushApiFactory = unifiedPushApiFactory
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue