This commit is contained in:
Benoit Marty
2024-05-23 00:26:28 +02:00
parent 5b8c0871e8
commit 955b4308ce
2 changed files with 3 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ class DefaultFirebaseNewTokenHandlerTest {
A_USER_ID -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
A_USER_ID_2 -> FakeUserPushStore(pushProviderName = "Other")
A_USER_ID_3 -> FakeUserPushStore(pushProviderName = FirebaseConfig.NAME)
else -> throw IllegalStateException()
else -> error("Unexpected sessionId: $sessionId")
}
}
),

View File

@@ -17,6 +17,7 @@
package io.element.android.libraries.pushproviders.unifiedpush
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.DiscoveryUnifiedPush
import io.element.android.tests.testutils.testCoroutineDispatchers
@@ -96,7 +97,7 @@ class DefaultUnifiedPushGatewayResolverTest {
@Test
fun `when a custom url is not reachable, the default url is returned`() = runTest {
val unifiedPushApiFactory = FakeUnifiedPushApiFactory(
discoveryResponse = { throw Exception() }
discoveryResponse = { throw AN_EXCEPTION }
)
val sut = createDefaultUnifiedPushGatewayResolver(
unifiedPushApiFactory = unifiedPushApiFactory