Skip to content

Commit 8434b50

Browse files
committed
Cleanup
1 parent 1d82ad3 commit 8434b50

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenterTest.kt

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
package io.element.android.libraries.troubleshoot.impl
99

10-
import app.cash.molecule.RecompositionMode
11-
import app.cash.molecule.moleculeFlow
12-
import app.cash.turbine.test
1310
import com.google.common.truth.Truth.assertThat
1411
import io.element.android.libraries.architecture.AsyncAction
1512
import io.element.android.libraries.push.test.FakeGetCurrentPushProvider
@@ -26,9 +23,7 @@ class TroubleshootNotificationsPresenterTest {
2623
@Test
2724
fun `present - initial state`() = runTest {
2825
val presenter = createTroubleshootNotificationsPresenter()
29-
moleculeFlow(RecompositionMode.Immediate) {
30-
presenter.present()
31-
}.test {
26+
presenter.test {
3227
val initialState = awaitItem()
3328
assertThat(initialState.testSuiteState.tests).isEmpty()
3429
assertThat(initialState.testSuiteState.mainState).isEqualTo(AsyncAction.Uninitialized)
@@ -43,9 +38,7 @@ class TroubleshootNotificationsPresenterTest {
4338
val presenter = createTroubleshootNotificationsPresenter(
4439
troubleshootTestSuite = troubleshootTestSuite,
4540
)
46-
moleculeFlow(RecompositionMode.Immediate) {
47-
presenter.present()
48-
}.test {
41+
presenter.test {
4942
val initialState = awaitItem()
5043
initialState.eventSink(TroubleshootNotificationsEvents.StartTests)
5144
skipItems(1)
@@ -66,9 +59,7 @@ class TroubleshootNotificationsPresenterTest {
6659
val presenter = createTroubleshootNotificationsPresenter(
6760
troubleshootTestSuite = troubleshootTestSuite,
6861
)
69-
moleculeFlow(RecompositionMode.Immediate) {
70-
presenter.present()
71-
}.test {
62+
presenter.test {
7263
val initialState = awaitItem()
7364
initialState.eventSink(TroubleshootNotificationsEvents.RetryFailedTests)
7465
skipItems(1)
@@ -163,9 +154,7 @@ class TroubleshootNotificationsPresenterTest {
163154
val presenter = createTroubleshootNotificationsPresenter(
164155
troubleshootTestSuite = troubleshootTestSuite,
165156
)
166-
moleculeFlow(RecompositionMode.Immediate) {
167-
presenter.present()
168-
}.test {
157+
presenter.test {
169158
skipItems(1)
170159
val initialState = awaitItem()
171160
assertThat(initialState.testSuiteState.mainState).isInstanceOf(AsyncAction.Failure::class.java)

0 commit comments

Comments
 (0)