Skip to content

Commit

Permalink
Fix unit test ✅
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegwamartin committed Aug 16, 2024
1 parent 4757022 commit a5c7252
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import org.smartregister.fhircore.engine.util.fhirpath.FhirPathDataExtractor
import org.smartregister.fhircore.geowidget.model.GeoJsonFeature
import org.smartregister.fhircore.geowidget.model.Geometry
import org.smartregister.fhircore.geowidget.model.ServicePointType
import org.smartregister.fhircore.geowidget.rule.CoroutineTestRule

@RunWith(RobolectricTestRunner::class)
@Config(sdk = [Build.VERSION_CODES.O_MR1], application = HiltTestApplication::class)
Expand All @@ -59,8 +58,6 @@ class GeoWidgetViewModelTest {

@get:Rule(order = 1) var instantTaskExecutorRule = InstantTaskExecutorRule()

@get:Rule(order = 2) var coroutinesTestRule = CoroutineTestRule()

@Inject lateinit var configService: ConfigService

private lateinit var configurationRegistry: ConfigurationRegistry
Expand Down Expand Up @@ -93,7 +90,6 @@ class GeoWidgetViewModelTest {
spyk(
DefaultRepository(
fhirEngine = fhirEngine,
dispatcherProvider = coroutinesTestRule.testDispatcherProvider,
sharedPreferencesHelper = sharedPreferencesHelper,
configurationRegistry = configurationRegistry,
configService = configService,
Expand All @@ -103,7 +99,7 @@ class GeoWidgetViewModelTest {
context = ApplicationProvider.getApplicationContext(),
),
)
geoWidgetViewModel = spyk(GeoWidgetViewModel(coroutinesTestRule.testDispatcherProvider))
geoWidgetViewModel = spyk(GeoWidgetViewModel(dispatcherProvider))

coEvery { defaultRepository.create(any()) } returns emptyList()
}
Expand Down

0 comments on commit a5c7252

Please sign in to comment.