Fix intermittent test failures of LoginExceptionFragmentStoreTest

upstream-sync
Christian Sadilek 3 years ago committed by mergify[bot]
parent 0cd08dc9b1
commit 8fd409b721

@ -4,7 +4,6 @@
package org.mozilla.fenix.exceptions.login
import io.mockk.mockk
import mozilla.components.feature.logins.exceptions.LoginException
import mozilla.components.support.test.ext.joinBlocking
import org.junit.Assert.assertEquals
@ -17,7 +16,12 @@ class LoginExceptionFragmentStoreTest {
fun onChange() {
val initialState = ExceptionsFragmentState()
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()
assertNotSame(initialState, store.state)

Loading…
Cancel
Save