Skip to content

Commit

Permalink
fix: use runBlocking in retrieveAll_Success
Browse files Browse the repository at this point in the history
runBlockingTest made this crash
  • Loading branch information
VaiTon committed Nov 30, 2021
1 parent 5687e34 commit 32dd869
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -2,6 +2,7 @@ package openfoodfacts.github.scrachx.openfood.category

import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runBlockingTest
import openfoodfacts.github.scrachx.openfood.MockitoHelper
import openfoodfacts.github.scrachx.openfood.category.mapper.CategoryMapper
Expand Down Expand Up @@ -43,7 +44,7 @@ class CategoryRepositoryTest {
}

@Test
fun retrieveAll_Success() = runBlockingTest {
fun retrieveAll_Success() = runBlocking { // runBlockingTest made this crash
val result = repository.retrieveAll()!![0]
assertThat(result).isEqualTo(category)
}
Expand Down

0 comments on commit 32dd869

Please sign in to comment.