Skip to content

Commit

Permalink
parsing: add test for full day event
Browse files Browse the repository at this point in the history
  • Loading branch information
shadyabhi committed Sep 29, 2024
1 parent e72cbe5 commit e6f42b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions calendar/maccalendar/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ func Test_GetEvent(t *testing.T) {
},
false,
},
{
"to be sipped, full day event",
args{
event: "Cleanup day\n notes: line1\n line2\n Aug 9, 2023\n uid: 2870243A-81F4-4276-A1E3-94F1F5B47139\n",
},
wantEvent{},
true,
},
}

for _, tt := range tests {
Expand All @@ -68,6 +76,11 @@ func Test_GetEvent(t *testing.T) {
return
}

if tt.wantErr == true {
t.Logf("Won't check event struct, got error")
return
}

if got.Start.IsZero() || got.Stop.IsZero() {
t.Fatalf("Start/Stop fields in Event can't be zero: %#v", got)
}
Expand Down

0 comments on commit e6f42b0

Please sign in to comment.