Skip to content

Commit

Permalink
dev: Fix test on CI
Browse files Browse the repository at this point in the history
Stupid timezone issues
  • Loading branch information
vHanda committed Aug 25, 2024
1 parent cbba9ad commit 93effc3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/note_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,14 @@ Hello
var note = await NoteStorage.load(file, parentFolder);
parentFolder.add(note);

expect(note.modified, DateTime.parse('2022-07-14'));
expect(note.created, DateTime.parse('2024-07-14'));
// Doing this to avoid timezone issues
expect(note.modified.year, 2022);
expect(note.modified.month, 7);
expect(note.modified.day, 14);

expect(note.created.year, 2024);
expect(note.created.month, 7);
expect(note.created.day, 14);

note = note.copyWith(
modified: DateTime.parse('2022-08-15'),
Expand Down

0 comments on commit 93effc3

Please sign in to comment.