Fix tests.
This commit is contained in:
parent
eafd94e4a6
commit
ea1ccbf806
3 changed files with 10 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ dependencies {
|
||||||
implementation(libs.kotlinx.collections.immutable)
|
implementation(libs.kotlinx.collections.immutable)
|
||||||
|
|
||||||
testCommonDependencies(libs)
|
testCommonDependencies(libs)
|
||||||
|
testImplementation(projects.features.enterprise.test)
|
||||||
testImplementation(projects.libraries.featureflag.test)
|
testImplementation(projects.libraries.featureflag.test)
|
||||||
testImplementation(projects.libraries.matrix.test)
|
testImplementation(projects.libraries.matrix.test)
|
||||||
testImplementation(projects.libraries.preferences.test)
|
testImplementation(projects.libraries.preferences.test)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
package io.element.android.libraries.matrix.impl.auth
|
package io.element.android.libraries.matrix.impl.auth
|
||||||
|
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
|
import io.element.android.features.enterprise.api.EnterpriseService
|
||||||
|
import io.element.android.features.enterprise.test.FakeEnterpriseService
|
||||||
import io.element.android.libraries.matrix.impl.ClientBuilderProvider
|
import io.element.android.libraries.matrix.impl.ClientBuilderProvider
|
||||||
import io.element.android.libraries.matrix.impl.FakeClientBuilderProvider
|
import io.element.android.libraries.matrix.impl.FakeClientBuilderProvider
|
||||||
import io.element.android.libraries.matrix.impl.createRustMatrixClientFactory
|
import io.element.android.libraries.matrix.impl.createRustMatrixClientFactory
|
||||||
|
|
@ -50,6 +52,7 @@ class RustMatrixAuthenticationServiceTest {
|
||||||
private fun TestScope.createRustMatrixAuthenticationService(
|
private fun TestScope.createRustMatrixAuthenticationService(
|
||||||
sessionStore: SessionStore = InMemorySessionStore(),
|
sessionStore: SessionStore = InMemorySessionStore(),
|
||||||
clientBuilderProvider: ClientBuilderProvider = FakeClientBuilderProvider(),
|
clientBuilderProvider: ClientBuilderProvider = FakeClientBuilderProvider(),
|
||||||
|
enterpriseService: EnterpriseService = FakeEnterpriseService(),
|
||||||
): RustMatrixAuthenticationService {
|
): RustMatrixAuthenticationService {
|
||||||
val baseDirectory = File("/base")
|
val baseDirectory = File("/base")
|
||||||
val cacheDirectory = File("/cache")
|
val cacheDirectory = File("/cache")
|
||||||
|
|
@ -68,6 +71,7 @@ class RustMatrixAuthenticationServiceTest {
|
||||||
buildMeta = aBuildMeta(),
|
buildMeta = aBuildMeta(),
|
||||||
oAuthRedirectUrlProvider = FakeOAuthRedirectUrlProvider(),
|
oAuthRedirectUrlProvider = FakeOAuthRedirectUrlProvider(),
|
||||||
),
|
),
|
||||||
|
enterpriseService = enterpriseService,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||||
rageshakeUrl = null,
|
rageshakeUrl = null,
|
||||||
brandColor = null,
|
brandColor = null,
|
||||||
notificationSound = null,
|
notificationSound = null,
|
||||||
|
identityProviderAppScheme = null,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -53,7 +54,8 @@ class DefaultSessionWellknownRetrieverTest {
|
||||||
"enforce_element_pro": true,
|
"enforce_element_pro": true,
|
||||||
"rageshake_url": "a_rageshake_url",
|
"rageshake_url": "a_rageshake_url",
|
||||||
"brand_color": "#FF0000",
|
"brand_color": "#FF0000",
|
||||||
"notification_sound": "a_notification_sound.flac"
|
"notification_sound": "a_notification_sound.flac",
|
||||||
|
"idp_app_scheme": "an_app_scheme"
|
||||||
}""".trimIndent().toByteArray()
|
}""".trimIndent().toByteArray()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -66,6 +68,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||||
rageshakeUrl = "a_rageshake_url",
|
rageshakeUrl = "a_rageshake_url",
|
||||||
brandColor = "#FF0000",
|
brandColor = "#FF0000",
|
||||||
notificationSound = "a_notification_sound.flac",
|
notificationSound = "a_notification_sound.flac",
|
||||||
|
identityProviderAppScheme = "an_app_scheme",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -93,6 +96,7 @@ class DefaultSessionWellknownRetrieverTest {
|
||||||
rageshakeUrl = "a_rageshake_url",
|
rageshakeUrl = "a_rageshake_url",
|
||||||
brandColor = null,
|
brandColor = null,
|
||||||
notificationSound = null,
|
notificationSound = null,
|
||||||
|
identityProviderAppScheme = null,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue