diff --git a/library/account/src/test/kotlin/org/cru/godtools/account/GodToolsAccountManagerTest.kt b/library/account/src/test/kotlin/org/cru/godtools/account/GodToolsAccountManagerTest.kt index f0e22c519a..a8191adccb 100644 --- a/library/account/src/test/kotlin/org/cru/godtools/account/GodToolsAccountManagerTest.kt +++ b/library/account/src/test/kotlin/org/cru/godtools/account/GodToolsAccountManagerTest.kt @@ -48,16 +48,22 @@ class GodToolsAccountManagerTest { } private val testScope = TestScope() private val userApi: UserApi = mockk() + private val isConnectedFlow = MutableStateFlow(true) private val manager = GodToolsAccountManager( providers = listOf(provider1, provider2), userApi = { userApi }, + isConnected = isConnectedFlow, coroutineScope = testScope.backgroundScope, ) @Test fun verifyInjectedProvidersSorted() { - val manager = GodToolsAccountManager(providers = setOf(provider2, provider1), userApi = { userApi }) + val manager = GodToolsAccountManager( + providers = setOf(provider2, provider1), + userApi = { userApi }, + isConnected = isConnectedFlow + ) assertEquals(listOf(provider1, provider2), manager.providers) } diff --git a/library/account/src/test/kotlin/org/cru/godtools/account/LoginResponseTest.kt b/library/account/src/test/kotlin/org/cru/godtools/account/LoginResponseTest.kt index faaa08b554..6e73ad5f8a 100644 --- a/library/account/src/test/kotlin/org/cru/godtools/account/LoginResponseTest.kt +++ b/library/account/src/test/kotlin/org/cru/godtools/account/LoginResponseTest.kt @@ -33,6 +33,12 @@ class LoginResponseTest { assertEquals(LoginResponse.Error.UserAlreadyExists, readParcelable(data)) } + @Test + fun `LoginResponse - Error - NotConnected - Parcelable`() { + val data = writeParcelable(LoginResponse.Error.NotConnected) + assertEquals(LoginResponse.Error.NotConnected, readParcelable(data)) + } + private fun writeParcelable(obj: Parcelable) = Parcel.obtain() .apply { writeParcelable(obj, 0) } .marshall()