2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Fix intermittent test failures of LoginExceptionFragmentStoreTest

This commit is contained in:
Christian Sadilek 2021-07-29 20:28:29 -04:00 committed by mergify[bot]
parent 2a67850677
commit acc5dc1220

View File

@ -4,7 +4,6 @@
package org.mozilla.fenix.exceptions.login package org.mozilla.fenix.exceptions.login
import io.mockk.mockk
import mozilla.components.feature.logins.exceptions.LoginException import mozilla.components.feature.logins.exceptions.LoginException
import mozilla.components.support.test.ext.joinBlocking import mozilla.components.support.test.ext.joinBlocking
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
@ -17,7 +16,12 @@ class LoginExceptionFragmentStoreTest {
fun onChange() { fun onChange() {
val initialState = ExceptionsFragmentState() val initialState = ExceptionsFragmentState()
val store = ExceptionsFragmentStore(initialState) val store = ExceptionsFragmentStore(initialState)
val newExceptionsItem: LoginException = mockk() val newExceptionsItem: LoginException = object : LoginException {
override val id: Long
get() = 1234L
override val origin: String
get() = "test"
}
store.dispatch(ExceptionsFragmentAction.Change(listOf(newExceptionsItem))).joinBlocking() store.dispatch(ExceptionsFragmentAction.Change(listOf(newExceptionsItem))).joinBlocking()
assertNotSame(initialState, store.state) assertNotSame(initialState, store.state)