Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Oct 30, 2024
1 parent c253a7c commit 6284500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class RealBrokenSitePrompt @Inject constructor(
override suspend fun userAcceptedPrompt() {
if (!_featureEnabled) return
brokenSiteReportRepository.resetDismissStreak()
// TODO (cbarreiro) Set next shown date based on limiting logic: https://app.asana.com/0/0/1208572901396846/f
brokenSiteReportRepository.setNextShownDate(null)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ class RealBrokenSitePromptTest {

@Test
fun whenUserAcceptedPromptThenResetDismissStreakAndSetNextShownDateToNull() = runTest {
testee.userAcceptedPrompt()
fakeBrokenSitePromptRCFeature.self().setRawStoredState(State(true))

testee.userAcceptedPrompt()

verify(mockBrokenSiteReportRepository).resetDismissStreak()
verify(mockBrokenSiteReportRepository).setNextShownDate(null)
}
Expand Down

0 comments on commit 6284500

Please sign in to comment.