# HG changeset patch # User Paul Boddie # Date 1431985316 -7200 # Node ID 8db780b930236ea04045d67d338e217f723930a0 # Parent 655ce8a846fe8932e9c1806ca8157f5e81362c3e Added tests of recurring event and recurrence cancellation, plus date-based recurrences. diff -r 655ce8a846fe -r 8db780b93023 tests/templates/event-cancel-recurring-instance.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/templates/event-cancel-recurring-instance.txt Mon May 18 23:41:56 2015 +0200 @@ -0,0 +1,34 @@ +Content-Type: multipart/alternative; boundary="===============0047278175==" +MIME-Version: 1.0 +From: paul.boddie@example.com +To: resource-room-confroom@example.com +Subject: Invitation! + +--===============0047278175== +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit + +This message contains an event. +--===============0047278175== +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL" + +BEGIN:VCALENDAR +PRODID:-//imip-agent/test//EN +METHOD:CANCEL +VERSION:2.0 +BEGIN:VEVENT +ORGANIZER:mailto:paul.boddie@example.com +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com +DTSTAMP:20141009T182400Z +DTSTART;TZID=Europe/Oslo:20141114T100000 +DTEND;TZID=Europe/Oslo:20141114T110000 +SUMMARY:Recurring event +UID:event3@example.com +RECURRENCE-ID:20141114T090000Z +END:VEVENT +END:VCALENDAR + +--===============0047278175==-- diff -r 655ce8a846fe -r 8db780b93023 tests/templates/event-cancel-recurring.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/templates/event-cancel-recurring.txt Mon May 18 23:41:56 2015 +0200 @@ -0,0 +1,33 @@ +Content-Type: multipart/alternative; boundary="===============0047278175==" +MIME-Version: 1.0 +From: paul.boddie@example.com +To: resource-room-confroom@example.com +Subject: Invitation! + +--===============0047278175== +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit + +This message contains an event. +--===============0047278175== +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL" + +BEGIN:VCALENDAR +PRODID:-//imip-agent/test//EN +METHOD:CANCEL +VERSION:2.0 +BEGIN:VEVENT +ORGANIZER:mailto:paul.boddie@example.com +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com +DTSTAMP:20141009T182400Z +DTSTART;TZID=Europe/Oslo:20141010T100000 +DTEND;TZID=Europe/Oslo:20141010T110000 +SUMMARY:Recurring event +UID:event3@example.com +END:VEVENT +END:VCALENDAR + +--===============0047278175==-- diff -r 655ce8a846fe -r 8db780b93023 tests/templates/event-request-recurring-day.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/templates/event-request-recurring-day.txt Mon May 18 23:41:56 2015 +0200 @@ -0,0 +1,34 @@ +Content-Type: multipart/alternative; boundary="===============0047278175==" +MIME-Version: 1.0 +From: paul.boddie@example.com +To: resource-room-confroom@example.com +Subject: Invitation! + +--===============0047278175== +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit + +This message contains an event. +--===============0047278175== +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST" + +BEGIN:VCALENDAR +PRODID:-//imip-agent/test//EN +METHOD:REQUEST +VERSION:2.0 +BEGIN:VEVENT +ORGANIZER:mailto:paul.boddie@example.com +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com +DTSTAMP:20141009T182400Z +DTSTART;TZID=Europe/Oslo:20141010 +DTEND;TZID=Europe/Oslo:20141011 +RRULE:FREQ=MONTHLY;BYDAY=2FR;COUNT=3 +SUMMARY:Recurring event +UID:event4@example.com +END:VEVENT +END:VCALENDAR + +--===============0047278175==-- diff -r 655ce8a846fe -r 8db780b93023 tests/test_resource_invitation.sh --- a/tests/test_resource_invitation.sh Mon May 18 20:16:14 2015 +0200 +++ b/tests/test_resource_invitation.sh Mon May 18 23:41:56 2015 +0200 @@ -109,3 +109,47 @@ && grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out9.tmp \ && echo "Success" \ || echo "Failed" + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring-instance.txt 2> /dev/null +echo "Cancel..." + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \ +| $SHOWMAIL \ +> out10.tmp + + grep -q 'METHOD:REPLY' out10.tmp \ +&& [ `grep 'FREEBUSY;FBTYPE=BUSY' out10.tmp | wc -l` = '2' ] \ +&& grep -q -v 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out10.tmp \ +&& echo "Success" \ +|| echo "Failed" + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring.txt 2> /dev/null +echo "Cancel..." + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \ +| $SHOWMAIL \ +> out11.tmp + + grep -q 'METHOD:REPLY' out11.tmp \ +&& grep -q -v 'FREEBUSY' out11.tmp \ +&& echo "Success" \ +|| echo "Failed" + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-day.txt 2> /dev/null \ +| $SHOWMAIL \ +> out12.tmp + + grep -q 'METHOD:REPLY' out12.tmp \ +&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out12.tmp \ +&& echo "Success" \ +|| echo "Failed" + + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \ +| $SHOWMAIL \ +> out13.tmp + + grep -q 'METHOD:REPLY' out13.tmp \ +&& [ `grep 'FREEBUSY;FBTYPE=BUSY' out13.tmp | wc -l` = '3' ] \ +&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141211T230000Z/20141212T230000Z' out13.tmp \ +&& echo "Success" \ +|| echo "Failed"