Skip to content

Commit

Permalink
WTA #44: Changed re-calculation start value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob3075 committed Oct 29, 2022
1 parent 4d50496 commit 6aa35e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CalculateCurrentStreakUC @Inject constructor(
recalculatedStreakForLast7Days: StreakRange,
) = when (recalculatedStreakForLast7Days.days) {
7 -> recalculateLatestStreakUC.calculate(
start = instantProvider.now().toDate().minus(7, DateTimeUnit.DAY),
start = instantProvider.now().toDate().minus(8, DateTimeUnit.DAY),
value = 1,
unit = DateTimeUnit.MONTH
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ internal class CalculateCurrentStreakUCTest {
.mockGetLast7DaysStats(
last7DaysStats.copy(weeklyTimeSpent = continuousWeeklyStats).right()
)
.mockRecalculateStreak(currentDay.minus(7, DateTimeUnit.DAY), result.right())
.mockRecalculateStreak(currentDay.minus(8, DateTimeUnit.DAY), result.right())
.callUseCase()
.resultsShouldBe(result.right())
}
Expand Down

0 comments on commit 6aa35e1

Please sign in to comment.