From 4026757201d317bf453814cae93809d8071840fb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 22 Oct 2025 11:55:58 +0200 Subject: [PATCH] Add missing tests on DefaultEnterpriseService --- .../impl/DefaultEnterpriseServiceTest.kt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt b/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt index 33bb8476db..b617f84bdd 100644 --- a/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt +++ b/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt @@ -10,6 +10,7 @@ package io.element.android.features.enterprise.impl import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.compound.colors.SemanticColorsLightDark +import io.element.android.features.enterprise.api.BugReportUrl import io.element.android.libraries.matrix.test.A_HOMESERVER_URL import io.element.android.libraries.matrix.test.A_SESSION_ID import kotlinx.coroutines.test.runTest @@ -59,4 +60,31 @@ class DefaultEnterpriseServiceTest { awaitComplete() } } + + @Test + fun `overrideBrandColor has no effect`() = runTest { + val defaultEnterpriseService = DefaultEnterpriseService() + defaultEnterpriseService.overrideBrandColor(A_SESSION_ID, "aColor") + } + + @Test + fun `firebasePushGateway returns null`() = runTest { + val defaultEnterpriseService = DefaultEnterpriseService() + assertThat(defaultEnterpriseService.firebasePushGateway()).isNull() + } + + @Test + fun `unifiedPushDefaultPushGateway returns null`() = runTest { + val defaultEnterpriseService = DefaultEnterpriseService() + assertThat(defaultEnterpriseService.unifiedPushDefaultPushGateway()).isNull() + } + + @Test + fun `bugReportUrlFlow only emits UseDefault`() = runTest { + val defaultEnterpriseService = DefaultEnterpriseService() + defaultEnterpriseService.bugReportUrlFlow(A_SESSION_ID).test { + assertThat(awaitItem()).isEqualTo(BugReportUrl.UseDefault) + awaitComplete() + } + } }