Skip to content

Commit

Permalink
test: modify TestGetEventWithoutEndVCALENDAR to check for missing DTS…
Browse files Browse the repository at this point in the history
…TART field
  • Loading branch information
revelaction committed Sep 13, 2024
1 parent a306884 commit 3f2b4d7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ical/alarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ END:VEVENT`
t.Fatalf("Failed to parse calendar: %v", err)
}

// Verify that the calendar is nil
if cal != nil {
t.Errorf("Expected calendar to be nil, but got %#v", cal)
// Get the first event
event := cal.Events()[0]

// Verify that the event does not have a DTSTART property
if event.GetProperty(ics.ComponentPropertyDtStart) != nil {
t.Errorf("Expected event to have no DTSTART property, but got %#v", event.GetProperty(ics.ComponentPropertyDtStart))
}
}

Expand Down

0 comments on commit 3f2b4d7

Please sign in to comment.