#!perl use Cassandane::Tiny; sub test_simple_attendee_no_partstat :min_version_3_7 { my ($self) = @_; my $CalDAV = $self->{caldav}; my $CalendarId = $CalDAV->NewCalendar({name => 'foo'}); $self->assert_not_null($CalendarId); my $now = DateTime->now(); $now->set_time_zone('Australia/Sydney'); # bump everything forward so a slow run (say: valgrind) # doesn't cause things to magically fire... $now->add(DateTime::Duration->new(seconds => 300)); # define the event to start in a few seconds my $startdt = $now->clone(); $startdt->add(DateTime::Duration->new(seconds => 2)); my $start = $startdt->strftime('%Y%m%dT%H%M%S'); my $enddt = $startdt->clone(); $enddt->add(DateTime::Duration->new(seconds => 15)); my $end = $enddt->strftime('%Y%m%dT%H%M%S'); # set the trigger to notify us at the start of the event my $trigger="PT0S"; my $uuid = "574E2CD0-2D2A-4554-8B63-C7504481D3A9"; my $href = "$CalendarId/$uuid.ics"; my $card = <Request('PUT', $href, $card, 'Content-Type' => 'text/calendar'); # clean notification cache $self->{instance}->getnotify(); $self->{instance}->run_command({ cyrus => 1 }, 'calalarmd', '-t' => $now->epoch() - 60 ); $self->assert_alarms(); $self->{instance}->run_command({ cyrus => 1 }, 'calalarmd', '-t' => $now->epoch() + 60 ); $self->assert_alarms({summary => 'Simple', start => $start, timezone => 'Australia/Sydney'}); }