Skip to content

Commit

Permalink
test: modify TestGetEventWithoutEndVCALENDAR to use expected DTSTART …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
revelaction committed Sep 13, 2024
1 parent 6a7ef73 commit 77fecc6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ical/alarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,16 @@ END:VEVENT`
// Get the first event
event := cal.Events()[0]

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

// If the DTSTART property exists, verify its value
if dtStartProp != nil && dtStartProp.Value != "20240902T100000Z" {
t.Errorf("Expected DTSTART value to be '20240902T100000Z', but got %s", dtStartProp.Value)
// Verify that the value of the DTSTART property matches the expected value
expectedValue := "20240902T100000Z"
if dtStartProp != nil && dtStartProp.Value != expectedValue {
t.Errorf("Expected DTSTART value to be '%s', but got '%s'", expectedValue, dtStartProp.Value)
}
}

Expand Down

0 comments on commit 77fecc6

Please sign in to comment.