1.1 --- a/tests/templates/event-request-person-recurring-rdate.txt Tue Apr 19 21:22:33 2016 +0200
1.2 +++ b/tests/templates/event-request-person-recurring-rdate.txt Tue Apr 19 21:57:44 2016 +0200
1.3 @@ -1,7 +1,7 @@
1.4 Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 MIME-Version: 1.0
1.6 From: paul.boddie@example.com
1.7 -To: vincent.vole@example.com
1.8 +To: vincent.vole@example.com, harvey.horse@example.com
1.9 Subject: Invitation!
1.10
1.11 --===============0047278175==
1.12 @@ -23,6 +23,7 @@
1.13 BEGIN:VEVENT
1.14 ORGANIZER:mailto:paul.boddie@example.com
1.15 ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
1.16 +ATTENDEE;RSVP=TRUE:mailto:harvey.horse@example.com
1.17 ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
1.18 DTSTAMP:20141009T182400Z
1.19 DTSTART;TZID=Europe/Oslo:20141010T100000
2.1 --- a/tests/test_person_invitation_decline_instance.sh Tue Apr 19 21:22:33 2016 +0200
2.2 +++ b/tests/test_person_invitation_decline_instance.sh Tue Apr 19 21:57:44 2016 +0200
2.3 @@ -2,15 +2,20 @@
2.4
2.5 . "`dirname \"$0\"`/common.sh"
2.6
2.7 -USER="mailto:vincent.vole@example.com"
2.8 +USER1="mailto:vincent.vole@example.com"
2.9 +USER2="mailto:harvey.horse@example.com"
2.10 SENDER="mailto:paul.boddie@example.com"
2.11
2.12 -mkdir -p "$PREFS/$USER"
2.13 -echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
2.14 -echo 'share' > "$PREFS/$USER/freebusy_sharing"
2.15 +mkdir -p "$PREFS/$USER1"
2.16 +echo 'Europe/Oslo' > "$PREFS/$USER1/TZID"
2.17 +echo 'share' > "$PREFS/$USER1/freebusy_sharing"
2.18 +
2.19 +mkdir -p "$PREFS/$USER2"
2.20 +echo 'Europe/Oslo' > "$PREFS/$USER2/TZID"
2.21 +echo 'share' > "$PREFS/$USER2/freebusy_sharing"
2.22
2.23 mkdir -p "$PREFS/$SENDER"
2.24 -echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
2.25 +echo 'Europe/Oslo' > "$PREFS/$SENDER/TZID"
2.26
2.27 # Test free/busy responses.
2.28
2.29 @@ -52,7 +57,7 @@
2.30 && echo "Success" \
2.31 || echo "Failed"
2.32
2.33 -# Test registration in the incoming handler for the recipient.
2.34 +# Test registration in the incoming handler for the recipients.
2.35
2.36 "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring-rdate.txt" 2>> $ERROR \
2.37 | "$SHOWMAIL" \
2.38 @@ -62,49 +67,81 @@
2.39 && echo "Success" \
2.40 || echo "Failed"
2.41
2.42 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.43 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.44 > out2f.tmp
2.45
2.46 ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out2f.tmp" \
2.47 && echo "Success" \
2.48 || echo "Failed"
2.49
2.50 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \
2.51 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy_other" "$SENDER" \
2.52 > out2o.tmp
2.53
2.54 grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out2o.tmp" \
2.55 && echo "Success" \
2.56 || echo "Failed"
2.57
2.58 + "$LIST_SCRIPT" $LIST_ARGS "$USER2" "freebusy" \
2.59 +> out2f2.tmp
2.60 +
2.61 + ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out2f2.tmp" \
2.62 +&& echo "Success" \
2.63 +|| echo "Failed"
2.64 +
2.65 + "$LIST_SCRIPT" $LIST_ARGS "$USER2" "freebusy_other" "$SENDER" \
2.66 +> out2o2.tmp
2.67 +
2.68 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out2o2.tmp" \
2.69 +&& echo "Success" \
2.70 +|| echo "Failed"
2.71 +
2.72 # There should be an event created by the sender.
2.73
2.74 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event26@example.com" \
2.75 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "object" "event26@example.com" \
2.76 > out2O.tmp
2.77
2.78 grep -q 'event26@example.com' "out2O.tmp" \
2.79 && echo "Success" \
2.80 || echo "Failed"
2.81
2.82 + "$LIST_SCRIPT" $LIST_ARGS "$USER2" "object" "event26@example.com" \
2.83 +> out2O2.tmp
2.84 +
2.85 + grep -q 'event26@example.com' "out2O2.tmp" \
2.86 +&& echo "Success" \
2.87 +|| echo "Failed"
2.88 +
2.89 # Test acceptance and registration in the outgoing handler.
2.90
2.91 - "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event26@example.com" 2>> $ERROR \
2.92 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER1" "event26@example.com" 2>> $ERROR \
2.93 | tee out3.tmp \
2.94 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
2.95
2.96 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.97 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.98 > out3f.tmp
2.99
2.100 grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out3f.tmp" \
2.101 && echo "Success" \
2.102 || echo "Failed"
2.103
2.104 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER2" "event26@example.com" 2>> $ERROR \
2.105 +| tee out32.tmp \
2.106 +| "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
2.107 +
2.108 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.109 +> out3f2.tmp
2.110 +
2.111 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out3f2.tmp" \
2.112 +&& echo "Success" \
2.113 +|| echo "Failed"
2.114 +
2.115 # Test registration in the incoming handler.
2.116
2.117 "$PERSON_SCRIPT" $ARGS < out3.tmp 2>> $ERROR \
2.118 | "$SHOWMAIL" \
2.119 > out4.tmp
2.120
2.121 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.122 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.123 > out4f.tmp
2.124
2.125 [ `grep "event26@example.com" "out4f.tmp" | wc -l` = '2' ] \
2.126 @@ -112,7 +149,7 @@
2.127 && echo "Success" \
2.128 || echo "Failed"
2.129
2.130 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \
2.131 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy_other" "$SENDER" \
2.132 > out4o.tmp
2.133
2.134 [ `grep "event26@example.com" "out4o.tmp" | wc -l` = '2' ] \
2.135 @@ -120,13 +157,34 @@
2.136 && echo "Success" \
2.137 || echo "Failed"
2.138
2.139 -# Test recurrence declining in the outgoing handler.
2.140 + "$PERSON_SCRIPT" $ARGS < out32.tmp 2>> $ERROR \
2.141 +| "$SHOWMAIL" \
2.142 +> out42.tmp
2.143 +
2.144 + "$LIST_SCRIPT" $LIST_ARGS "$USER2" "freebusy" \
2.145 +> out4f2.tmp
2.146 +
2.147 + [ `grep "event26@example.com" "out4f2.tmp" | wc -l` = '2' ] \
2.148 +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out4f2.tmp" \
2.149 +&& echo "Success" \
2.150 +|| echo "Failed"
2.151
2.152 - "$DECLINE_SCRIPT" $DECLINE_ARGS "$USER" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.153 + "$LIST_SCRIPT" $LIST_ARGS "$USER2" "freebusy_other" "$SENDER" \
2.154 +> out4o2.tmp
2.155 +
2.156 + [ `grep "event26@example.com" "out4o2.tmp" | wc -l` = '2' ] \
2.157 +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out4o2.tmp" \
2.158 +&& echo "Success" \
2.159 +|| echo "Failed"
2.160 +
2.161 +# Test recurrence declining in the outgoing handler.
2.162 +# Only the first user declines.
2.163 +
2.164 + "$DECLINE_SCRIPT" $DECLINE_ARGS "$USER1" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.165 | tee out5.tmp \
2.166 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
2.167
2.168 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.169 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.170 > out5s.tmp
2.171
2.172 [ `grep "event26@example.com" "out5s.tmp" | wc -l` = '1' ] \
2.173 @@ -136,10 +194,10 @@
2.174
2.175 # There should be a recurrence created by the user.
2.176
2.177 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event26@example.com" \
2.178 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "object" "event26@example.com" \
2.179 > out5O.tmp
2.180
2.181 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event26@example.com" "20141011T100000" \
2.182 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "recurrence" "event26@example.com" "20141011T100000" \
2.183 > out5R.tmp
2.184
2.185 grep -q 'event26@example.com' "out5O.tmp" \
2.186 @@ -161,7 +219,7 @@
2.187 && echo "Success" \
2.188 || echo "Failed"
2.189
2.190 - "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER" \
2.191 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER1" \
2.192 > out6o.tmp
2.193
2.194 [ `grep "event26@example.com" "out6o.tmp" | wc -l` = '1' ] \
2.195 @@ -169,6 +227,16 @@
2.196 && echo "Success" \
2.197 || echo "Failed"
2.198
2.199 +# The second user is still attending the original event.
2.200 +
2.201 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER2" \
2.202 +> out6o2.tmp
2.203 +
2.204 + [ `grep "event26@example.com" "out6o2.tmp" | wc -l` = '2' ] \
2.205 +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out6o2.tmp" \
2.206 +&& echo "Success" \
2.207 +|| echo "Failed"
2.208 +
2.209 # There should be a recurrence created by the user.
2.210
2.211 "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event26@example.com" \
2.212 @@ -184,11 +252,11 @@
2.213
2.214 # Test recurrence acceptance in the outgoing handler.
2.215
2.216 - "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.217 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER1" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.218 | tee out7.tmp \
2.219 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
2.220
2.221 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.222 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "freebusy" \
2.223 > out7s.tmp
2.224
2.225 [ `grep "event26@example.com" "out7s.tmp" | wc -l` = '2' ] \
2.226 @@ -198,10 +266,10 @@
2.227
2.228 # There should still be a recurrence created by the user.
2.229
2.230 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event26@example.com" \
2.231 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "object" "event26@example.com" \
2.232 > out7O.tmp
2.233
2.234 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event26@example.com" "20141011T100000" \
2.235 + "$LIST_SCRIPT" $LIST_ARGS "$USER1" "recurrence" "event26@example.com" "20141011T100000" \
2.236 > out7R.tmp
2.237
2.238 grep -q 'event26@example.com' "out7O.tmp" \
2.239 @@ -223,7 +291,7 @@
2.240 && echo "Success" \
2.241 || echo "Failed"
2.242
2.243 - "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER" \
2.244 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER1" \
2.245 > out8o.tmp
2.246
2.247 [ `grep "event26@example.com" "out8o.tmp" | wc -l` = '2' ] \
2.248 @@ -231,6 +299,16 @@
2.249 && echo "Success" \
2.250 || echo "Failed"
2.251
2.252 +# The second user should not have been affected.
2.253 +
2.254 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$USER2" \
2.255 +> out8o2.tmp
2.256 +
2.257 + [ `grep "event26@example.com" "out8o2.tmp" | wc -l` = '2' ] \
2.258 +&& grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out8o2.tmp" \
2.259 +&& echo "Success" \
2.260 +|| echo "Failed"
2.261 +
2.262 # There should be a recurrence created by the user.
2.263
2.264 "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event26@example.com" \
3.1 --- a/tests/test_person_invitation_recurring.sh Tue Apr 19 21:22:33 2016 +0200
3.2 +++ b/tests/test_person_invitation_recurring.sh Tue Apr 19 21:57:44 2016 +0200
3.3 @@ -10,7 +10,7 @@
3.4 echo 'share' > "$PREFS/$USER/freebusy_sharing"
3.5
3.6 mkdir -p "$PREFS/$SENDER"
3.7 -echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
3.8 +echo 'Europe/Oslo' > "$PREFS/$SENDER/TZID"
3.9
3.10 # Test free/busy responses.
3.11