Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #21733 - Simplify test to not depend on store updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugurell authored and csadilek committed Oct 8, 2021
1 parent 4d5bd9e commit 79a4873
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@ class DefaultPocketStoriesControllerTest {
)
val controller = DefaultPocketStoriesController(mockk(), store, mockk(), metrics)

controller.handleCategoryClick(category1)
verify(exactly = 0) { store.dispatch(HomeFragmentAction.DeselectPocketStoriesCategory(category1.name)) }
verify { store.dispatch(HomeFragmentAction.SelectPocketStoriesCategory(category1.name)) }
verify { metrics.track(Event.PocketHomeRecsCategoryClicked(category1.name, 1, true)) }

controller.handleCategoryClick(category2)
verify(exactly = 0) { store.dispatch(HomeFragmentAction.SelectPocketStoriesCategory(category2.name)) }
verify { store.dispatch(HomeFragmentAction.DeselectPocketStoriesCategory(category2.name)) }
verify { metrics.track(Event.PocketHomeRecsCategoryClicked(category2.name, 2, false)) }
verify { metrics.track(Event.PocketHomeRecsCategoryClicked(category2.name, 1, false)) }
}

@Test
Expand Down

0 comments on commit 79a4873

Please sign in to comment.