Skip to content

Commit

Permalink
chore: Fix tests (#5263)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Aug 1, 2024
1 parent e54bf5f commit 848c65d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class ProductCompareViewModelTest {
fun addProductToCompare_shouldEmitAlreadyExistEvent_whenTheSameProductAdded() = runBlockingTest {
// GIVEN
val product = mockk<Product> {
every { barcode } returns Barcode("qwerty")
every { code } returns "qwerty"
every { barcode } returns Barcode(code)
every { additivesTags } returns mutableListOf()
}

Expand Down Expand Up @@ -121,6 +122,7 @@ class ProductCompareViewModelTest {
.returns(AdditiveName("test-name3"))

every { matomoAnalytics.trackEvent(ofType<AnalyticsEvent.AddProductToComparison>()) } returns Unit
every { matomoAnalytics.trackEvent(ofType<AnalyticsEvent.CompareProducts>()) } returns Unit

val flowItems = mutableListOf<List<CompareProduct>>()
val job = launch {
Expand Down

0 comments on commit 848c65d

Please sign in to comment.