2
0
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:
Christian Sadilek 2020-09-30 17:01:56 -04:00 committed by Arturo Mejia
parent 1589942479
commit 33e49d471b

View File

@ -8,6 +8,7 @@ import androidx.fragment.app.FragmentActivity
import androidx.preference.Preference
import io.mockk.every
import io.mockk.mockk
import io.mockk.mockkObject
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestCoroutineDispatcher
import mozilla.components.support.test.robolectric.testContext
@ -19,7 +20,9 @@ import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.Config
import org.mozilla.fenix.R
import org.mozilla.fenix.ReleaseChannel
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
@ -41,6 +44,9 @@ class SettingsFragmentTest {
// Mock client for fetching account avatar
val client = testContext.components.core.client
every { client.fetch(any()) } throws IOException("test")
mockkObject(Config)
every { Config.channel } returns ReleaseChannel.Nightly
}
@Test