-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check if event status was changed to cancelled and generate appr…
…opriate message Signed-off-by: SebastianKrupinski <[email protected]>
- Loading branch information
1 parent
fad6391
commit d7883c3
Showing
2 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -814,4 +814,66 @@ public function testInviteChangeExdateOrder(): void | |
|
||
$this->parse($oldMessage, $newMessage, $expected, 'mailto:[email protected]'); | ||
} | ||
|
||
public function testInviteStatusCancelled(): void | ||
{ | ||
$oldMessage = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
UID:foobar | ||
SEQUENCE:2 | ||
ORGANIZER;CN=Strunk:mailto:[email protected] | ||
ATTENDEE;CN=One:mailto:[email protected] | ||
DTSTART:20140716T120000Z | ||
DTEND:20140716T130000Z | ||
STATUS:CONFIRMED | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$newMessage = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
UID:foobar | ||
SEQUENCE:3 | ||
ORGANIZER;CN=Strunk:mailto:[email protected] | ||
ATTENDEE;CN=One:mailto:[email protected] | ||
DTSTART:20140716T120000Z | ||
DTEND:20140716T130000Z | ||
STATUS:CANCELLED | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$version = Version::VERSION; | ||
|
||
$expected = [ | ||
[ | ||
'uid' => 'foobar', | ||
'method' => 'CANCEL', | ||
'component' => 'VEVENT', | ||
'message' => <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:-//Sabre//Sabre VObject $version//EN | ||
CALSCALE:GREGORIAN | ||
METHOD:CANCEL | ||
BEGIN:VEVENT | ||
UID:foobar | ||
DTSTAMP:**ANY** | ||
SEQUENCE:3 | ||
DTSTART:20140716T120000Z | ||
DTEND:20140716T130000Z | ||
ORGANIZER;CN=Strunk:mailto:[email protected] | ||
ATTENDEE;CN=One:mailto:[email protected] | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS, | ||
], | ||
]; | ||
|
||
$this->parse($oldMessage, $newMessage, $expected, 'mailto:[email protected]'); | ||
} | ||
} |