mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1834746 - Replace OAuthAccount mock with implementation mock.
See also mockk bug: https://github.com/mockk/mockk/issues/1035.
This commit is contained in:
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…
Reference in New Issue
Block a user