File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
AnkiDroid/src/test/java/com/ichi2/anki Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -138,23 +138,22 @@ class CardBrowserTest : RobolectricTest() {
138138 }
139139
140140 @Test
141- fun testOnDeckSelected () = runBlocking {
141+ fun testOnDeckSelected () = withBrowser(noteCount = 1 ) {
142142 // Arrange
143143 val deckId = 123L
144144 val selectableDeck = DeckSelectionDialog .SelectableDeck (deckId, " Test Deck" )
145- val cardBrowser = getBrowserWithNotes(1 )
146145
147146 // Act
148- cardBrowser .onDeckSelected(selectableDeck)
147+ this .onDeckSelected(selectableDeck)
149148
150149 // Assert
151- assertEquals(deckId, cardBrowser .lastDeckId)
150+ assertEquals(deckId, this .lastDeckId)
152151
153152 // Act again: select the same deck
154- cardBrowser .onDeckSelected(selectableDeck)
153+ this .onDeckSelected(selectableDeck)
155154
156155 // Assert again: the deck selection should not change
157- assertEquals(deckId, cardBrowser .lastDeckId)
156+ assertEquals(deckId, this .lastDeckId)
158157 }
159158
160159 @Test
You can’t perform that action at this time.
0 commit comments