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

[fenix] Fix init order in TrackingProtectionExceptionsViewTest

This commit is contained in:
Christian Sadilek 2021-07-26 14:16:03 -04:00 committed by Sebastian Kaspari
parent 0f8e4450a2
commit 3bc9ed6cba

View File

@ -24,7 +24,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
@ -39,6 +38,8 @@ class TrackingProtectionExceptionsViewTest {
@Before @Before
fun setup() { fun setup() {
mockkConstructor(TrackingProtectionExceptionsAdapter::class) mockkConstructor(TrackingProtectionExceptionsAdapter::class)
every { anyConstructed<TrackingProtectionExceptionsAdapter>().updateData(any()) } just Runs
container = FrameLayout(testContext) container = FrameLayout(testContext)
interactor = mockk() interactor = mockk()
@ -46,7 +47,6 @@ class TrackingProtectionExceptionsViewTest {
container, container,
interactor interactor
) )
every { anyConstructed<TrackingProtectionExceptionsAdapter>().updateData(any()) } just Runs
} }
@After @After
@ -66,7 +66,6 @@ class TrackingProtectionExceptionsViewTest {
} }
@Test @Test
@Ignore("With latest Robolectric/mockk: updateData() was not called")
fun `binds empty list to adapter`() { fun `binds empty list to adapter`() {
exceptionsView.update(emptyList()) exceptionsView.update(emptyList())
@ -77,7 +76,6 @@ class TrackingProtectionExceptionsViewTest {
} }
@Test @Test
@Ignore("With latest Robolectric/mockk updateData() was not called")
fun `binds list with items to adapter`() { fun `binds list with items to adapter`() {
val items = listOf<TrackingProtectionException>(mockk(), mockk()) val items = listOf<TrackingProtectionException>(mockk(), mockk())
exceptionsView.update(items) exceptionsView.update(items)