mirror of
https://github.com/bitwarden/android.git
synced 2026-08-28 22:45:25 -05:00
Use correct feature for syncing with Bitwarden (#230)
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ class AuthenticatorRepositoryImpl @Inject constructor(
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
override val sharedCodesStateFlow: StateFlow<SharedVerificationCodesState> by lazy {
|
||||
if (!featureFlagManager.getFeatureFlag(LocalFeatureFlag.BitwardenAuthenticationEnabled)) {
|
||||
if (!featureFlagManager.getFeatureFlag(LocalFeatureFlag.PasswordManagerSync)) {
|
||||
MutableStateFlow(SharedVerificationCodesState.FeatureNotEnabled)
|
||||
} else {
|
||||
authenticatorBridgeManager
|
||||
|
||||
+3
-3
@@ -43,7 +43,7 @@ class AuthenticatorRepositoryTest {
|
||||
private val mockImportManager = mockk<ImportManager>()
|
||||
private val mockDispatcherManager = FakeDispatcherManager()
|
||||
private val mockFeatureFlagManager = mockk<FeatureFlagManager> {
|
||||
every { getFeatureFlag(LocalFeatureFlag.BitwardenAuthenticationEnabled) } returns true
|
||||
every { getFeatureFlag(LocalFeatureFlag.PasswordManagerSync) } returns true
|
||||
}
|
||||
|
||||
private val authenticatorRepository = AuthenticatorRepositoryImpl(
|
||||
@@ -79,7 +79,7 @@ class AuthenticatorRepositoryTest {
|
||||
@Test
|
||||
fun `sharedCodesStateFlow value should be FeatureNotEnabled when feature flag is off`() {
|
||||
every {
|
||||
mockFeatureFlagManager.getFeatureFlag(LocalFeatureFlag.BitwardenAuthenticationEnabled)
|
||||
mockFeatureFlagManager.getFeatureFlag(LocalFeatureFlag.PasswordManagerSync)
|
||||
} returns false
|
||||
val repository = AuthenticatorRepositoryImpl(
|
||||
authenticatorDiskSource = fakeAuthenticatorDiskSource,
|
||||
@@ -111,7 +111,7 @@ class AuthenticatorRepositoryTest {
|
||||
@Test
|
||||
fun `sharedCodesStateFlow should emit FeatureNotEnabled when feature flag is off`() = runTest {
|
||||
every {
|
||||
mockFeatureFlagManager.getFeatureFlag(LocalFeatureFlag.BitwardenAuthenticationEnabled)
|
||||
mockFeatureFlagManager.getFeatureFlag(LocalFeatureFlag.PasswordManagerSync)
|
||||
} returns false
|
||||
val repository = AuthenticatorRepositoryImpl(
|
||||
authenticatorDiskSource = fakeAuthenticatorDiskSource,
|
||||
|
||||
Reference in New Issue
Block a user