mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/15555: Set channel to Nightly explicitly for SettingsFragmentTest
This commit is contained in:
parent
1589942479
commit
33e49d471b
@ -8,6 +8,7 @@ import androidx.fragment.app.FragmentActivity
|
|||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import io.mockk.every
|
import io.mockk.every
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
|
import io.mockk.mockkObject
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import kotlinx.coroutines.test.TestCoroutineDispatcher
|
import kotlinx.coroutines.test.TestCoroutineDispatcher
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
@ -19,7 +20,9 @@ import org.junit.Before
|
|||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
|
import org.mozilla.fenix.Config
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.ReleaseChannel
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.getPreferenceKey
|
import org.mozilla.fenix.ext.getPreferenceKey
|
||||||
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
|
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
|
||||||
@ -41,6 +44,9 @@ class SettingsFragmentTest {
|
|||||||
// Mock client for fetching account avatar
|
// Mock client for fetching account avatar
|
||||||
val client = testContext.components.core.client
|
val client = testContext.components.core.client
|
||||||
every { client.fetch(any()) } throws IOException("test")
|
every { client.fetch(any()) } throws IOException("test")
|
||||||
|
|
||||||
|
mockkObject(Config)
|
||||||
|
every { Config.channel } returns ReleaseChannel.Nightly
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user