Add a way to override default homeserver.

This commit is contained in:
Benoit Marty 2025-02-20 17:10:43 +01:00 committed by Benoit Marty
parent e5ed0a0641
commit 0a5784992f
14 changed files with 145 additions and 121 deletions

View file

@ -22,6 +22,8 @@ class DefaultEnterpriseService @Inject constructor() : EnterpriseService {
override suspend fun isEnterpriseUser(sessionId: SessionId) = false
override fun defaultHomeserver() = null
override fun semanticColorsLight(): SemanticColors = compoundColorsLight
override fun semanticColorsDark(): SemanticColors = compoundColorsDark

View file

@ -19,6 +19,12 @@ class DefaultEnterpriseServiceTest {
assertThat(defaultEnterpriseService.isEnterpriseBuild).isFalse()
}
@Test
fun `defaultHomeserver should return null`() {
val defaultEnterpriseService = DefaultEnterpriseService()
assertThat<String?>(defaultEnterpriseService.defaultHomeserver()).isNull()
}
@Test
fun `isEnterpriseUser always return false`() = runTest {
val defaultEnterpriseService = DefaultEnterpriseService()