Created
September 5, 2020 20:23
-
-
Save GianpaMX/d56ae20aa55673617a893509feefc3d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| fun `Turn on DND when Pomodoro starts`() = runBlockingTest { | |
| zenModeApi.mode = ZenMode.Off | |
| whenever(transitionApi.observeTransitionLog()).thenReturn( | |
| flowOf( | |
| Transition(State.IDLE, 0), | |
| Transition(State.POMODORO, 0), | |
| Transition(State.DONE, 0) | |
| ) | |
| ) | |
| observeState().test { cancelAndIgnoreRemainingEvents() } | |
| verify(zenModeApi).mode = ZenMode.AlarmsOnly | |
| assertThat(zenModeApi.mode).isEqualTo(ZenMode.Off) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment