Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6e9aa2a authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Fix ZenModeRepositoryTest flag flipping

Turns out we need to have the SetFlagsRule in the class (normally I
didn't worry about it because it was in SysuiTestCase).

Fix: 352289773
Flag: TEST_ONLY
Test: this
Change-Id: I09773a6c95f97df28515b84f050f1c6370b5c37e
parent 58eb0b24
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.database.ContentObserver
import android.os.Parcelable
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.SetFlagsRule
import android.provider.Settings.Global
import androidx.test.filters.SmallTest
import com.android.settingslib.flags.Flags
@@ -39,6 +40,7 @@ import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
@@ -55,6 +57,8 @@ import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
@SmallTest
class ZenModeRepositoryTest {
    @get:Rule val setFlagsRule = SetFlagsRule()

    @Mock private lateinit var context: Context

    @Mock private lateinit var notificationManager: NotificationManager