Skip to content

Commit

Permalink
Merge pull request #3 from FriesI23/fix-unittest
Browse files Browse the repository at this point in the history
fix: Change Unit test datetime to a confirmed date.
  • Loading branch information
FriesI23 authored Apr 26, 2023
2 parents 26b00d5 + 2202dce commit e551ed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/model_test/habit_reminder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void main() {
group('Test HabitReminder getNextRemindDate Daily', () {
test('daily reminder should return next date', () {
const reminder = HabitReminder.daily(time: TimeOfDay(hour: 9, minute: 0));
final today = DateTime.now();
final today = DateTime(2022, 1, 1, 18);
final nextRemindDate = reminder.getNextRemindDate(crtDate: today);
final expectedDate = DateTime(today.year, today.month, today.day, 9, 0)
.add(const Duration(days: 1));
Expand Down Expand Up @@ -186,7 +186,7 @@ void main() {

test('daily reminder should return tomorrow date if time has passed', () {
const reminder = HabitReminder.daily(time: TimeOfDay(hour: 8, minute: 0));
final today = DateTime.now();
final today = DateTime(2022, 1, 1, 18);
final nextRemindDate = reminder.getNextRemindDate(crtDate: today);
final expectedDate = DateTime(today.year, today.month, today.day, 8, 0)
.add(const Duration(days: 1));
Expand Down

0 comments on commit e551ed6

Please sign in to comment.