# HG changeset patch # User Paul Boddie # Date 1432227448 -7200 # Node ID bfcdebf855d755e23420c90c5a38d153afc30032 # Parent 09f117e6086e7fbe8205d31a653b73c687b8abbf Added tests of event cancellation for person recipients. diff -r 09f117e6086e -r bfcdebf855d7 tests/templates/event-cancel-person-all.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/templates/event-cancel-person-all.txt Thu May 21 18:57:28 2015 +0200 @@ -0,0 +1,38 @@ +Content-Type: multipart/alternative; boundary="===============0047278175==" +MIME-Version: 1.0 +From: paul.boddie@example.com +To: vincent.vole@example.com +Subject: Cancellation! + +Cancel the event for vincent.vole and paul.boddie. The free/busy details for +the recipients should be updated, even those employing the person handler. + +--===============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:vincent.vole@example.com +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com +DTSTAMP:20141125T004600Z +DTSTART;TZID=Europe/Oslo:20141126T160000 +DTEND;TZID=Europe/Oslo:20141126T170000 +SUMMARY:Meeting at 4pm +UID:event6@example.com +SEQUENCE:2 +END:VEVENT +END:VCALENDAR + +--===============0047278175==-- diff -r 09f117e6086e -r bfcdebf855d7 tests/templates/event-cancel-person.txt --- a/tests/templates/event-cancel-person.txt Thu May 21 18:56:54 2015 +0200 +++ b/tests/templates/event-cancel-person.txt Thu May 21 18:57:28 2015 +0200 @@ -25,7 +25,6 @@ BEGIN:VEVENT ORGANIZER:mailto:paul.boddie@example.com ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com -ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com DTSTAMP:20141125T004600Z DTSTART;TZID=Europe/Oslo:20141126T160000 DTEND;TZID=Europe/Oslo:20141126T170000 diff -r 09f117e6086e -r bfcdebf855d7 tests/test_person_invitation.sh --- a/tests/test_person_invitation.sh Thu May 21 18:56:54 2015 +0200 +++ b/tests/test_person_invitation.sh Thu May 21 18:57:28 2015 +0200 @@ -94,3 +94,35 @@ && ! grep -q "event7@example.com" "$FBFILE" \ && echo "Success" \ || echo "Failed" + + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person.txt" 2> /dev/null \ +| "$SHOWMAIL" \ +> out6.tmp + + ! grep -q 'METHOD:REPLY' out6.tmp \ +&& echo "Success" \ +|| echo "Failed" + + ! grep -q "event6@example.com" "$FBFILE" \ +&& echo "Success" \ +|| echo "Failed" + + grep -q "event6@example.com" "$FBOTHERFILE" \ +&& echo "Success" \ +|| echo "Failed" + + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person-all.txt" 2> /dev/null \ +| "$SHOWMAIL" \ +> out7.tmp + + ! grep -q 'METHOD:REPLY' out7.tmp \ +&& echo "Success" \ +|| echo "Failed" + + ! grep -q "event6@example.com" "$FBFILE" \ +&& echo "Success" \ +|| echo "Failed" + + ! grep -q "event6@example.com" "$FBOTHERFILE" \ +&& echo "Success" \ +|| echo "Failed"