# HG changeset patch # User Paul Boddie # Date 1461092253 -7200 # Node ID a0043845de02c1de0d3e2874750809839d620941 # Parent 07a7dc43e409a16ce99f121d5cf24111d47c2987 Test changes in attendance for declined recurrences. diff -r 07a7dc43e409 -r a0043845de02 tests/test_person_invitation_decline_instance.sh --- a/tests/test_person_invitation_decline_instance.sh Tue Apr 19 19:05:13 2016 +0200 +++ b/tests/test_person_invitation_decline_instance.sh Tue Apr 19 20:57:33 2016 +0200 @@ -181,3 +181,65 @@ && grep -q 'event26@example.com' "out6R.tmp" \ && echo "Success" \ || echo "Failed" + +# Test recurrence acceptance in the outgoing handler. + + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \ +| tee out7.tmp \ +| "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR + + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \ +> out7s.tmp + + [ `grep "event26@example.com" "out7s.tmp" | wc -l` = '2' ] \ +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out7s.tmp" \ +&& echo "Success" \ +|| echo "Failed" + +# There should still be a recurrence created by the user. + + "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event26@example.com" \ +> out7O.tmp + + "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event26@example.com" "20141011T100000" \ +> out7R.tmp + + grep -q 'event26@example.com' "out7O.tmp" \ +&& grep -q 'event26@example.com' "out7R.tmp" \ +&& echo "Success" \ +|| echo "Failed" + +# Test acceptance in the incoming handler. + + "$PERSON_SCRIPT" $ARGS < out7.tmp 2>> $ERROR \ +| "$SHOWMAIL" \ +> out8.tmp + + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy" \ +> out8f.tmp + + [ `grep "event26@example.com" "out8f.tmp" | wc -l` = '2' ] \ +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out8f.tmp" \ +&& echo "Success" \ +|| echo "Failed" + + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER" \ +> out8o.tmp + + [ `grep "event26@example.com" "out8o.tmp" | wc -l` = '2' ] \ +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out8o.tmp" \ +&& echo "Success" \ +|| echo "Failed" + +# There should be a recurrence created by the user. + + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event26@example.com" \ +> out8O.tmp + + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "recurrence" "event26@example.com" "20141011T100000" \ +> out8R.tmp + + grep -q 'event26@example.com' "out8O.tmp" \ +&& grep -q 'event26@example.com' "out8R.tmp" \ +&& echo "Success" \ +|| echo "Failed"