Bug 1834746 - Replace OAuthAccount mock with implementation mock.

See also mockk bug: https://github.com/mockk/mockk/issues/1035.
fenix/115.2.0
mcarare 1 year ago committed by mergify[bot]
parent 6c80e5c476
commit 9e543637e5

@ -9,6 +9,7 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import io.mockk.mockk
import mozilla.components.concept.sync.AuthType
import mozilla.components.service.fxa.FirefoxAccount
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Assert.assertTrue
@ -65,7 +66,8 @@ class NimbusEventTest {
@Test
fun telemetryAccountObserverTest() {
val observer = TelemetryAccountObserver(appContext)
observer.onAuthenticated(mockk(), AuthType.Signin)
// replacing interface mock with implementation mock.
observer.onAuthenticated(mockk<FirefoxAccount>(), AuthType.Signin)
Experimentation.withHelper {
assertTrue(evalJexl("'sync_auth.sign_in'|eventSum('Days', 28, 0) > 0"))

Loading…
Cancel
Save