[fenix] For https://github.com/mozilla-mobile/fenix/issues/24618 - Replace a Mockito mock with a Mockk mock

And in such fix seemingly intermittently failing tests preventing the merge.
pull/600/head
Mugurell 3 years ago committed by mergify[bot]
parent f2b6af4f6a
commit 0ac1168120

@ -25,7 +25,6 @@ import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.concept.engine.history.HistoryItem import mozilla.components.concept.engine.history.HistoryItem
import mozilla.components.concept.storage.HistoryMetadataKey import mozilla.components.concept.storage.HistoryMetadataKey
import mozilla.components.support.test.ext.joinBlocking import mozilla.components.support.test.ext.joinBlocking
import mozilla.components.support.test.mock
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull import org.junit.Assert.assertNull
import org.junit.Before import org.junit.Before
@ -760,7 +759,7 @@ class HistoryMetadataMiddlewareTest {
SearchEngine( SearchEngine(
id = "google", id = "google",
name = "Google", name = "Google",
icon = mock(), icon = mockk(),
type = SearchEngine.Type.BUNDLED, type = SearchEngine.Type.BUNDLED,
resultUrls = listOf("https://google.com?q={searchTerms}") resultUrls = listOf("https://google.com?q={searchTerms}")
) )

@ -19,7 +19,6 @@ import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.service.glean.testing.GleanTestRule import mozilla.components.service.glean.testing.GleanTestRule
import mozilla.components.support.base.android.Clock import mozilla.components.support.base.android.Clock
import mozilla.components.support.test.ext.joinBlocking import mozilla.components.support.test.ext.joinBlocking
import mozilla.components.support.test.mock
import mozilla.components.support.test.robolectric.testContext import mozilla.components.support.test.robolectric.testContext
import mozilla.components.support.test.rule.MainCoroutineRule import mozilla.components.support.test.rule.MainCoroutineRule
import org.junit.After import org.junit.After
@ -287,7 +286,7 @@ class TelemetryMiddlewareTest {
store.dispatch( store.dispatch(
EngineAction.LinkEngineSessionAction( EngineAction.LinkEngineSessionAction(
tabId = "foreground", tabId = "foreground",
engineSession = mock() engineSession = mockk(relaxed = true)
) )
).joinBlocking() ).joinBlocking()
@ -324,7 +323,7 @@ class TelemetryMiddlewareTest {
store.dispatch( store.dispatch(
EngineAction.LinkEngineSessionAction( EngineAction.LinkEngineSessionAction(
tabId = "background_pocket", tabId = "background_pocket",
engineSession = mock() engineSession = mockk(relaxed = true)
) )
).joinBlocking() ).joinBlocking()

Loading…
Cancel
Save