1.1 --- a/tests/common.sh Tue Jan 16 23:29:39 2018 +0100
1.2 +++ b/tests/common.sh Thu Jan 18 16:38:23 2018 +0100
1.3 @@ -134,6 +134,26 @@
1.4 fi
1.5 }
1.6
1.7 +test_initial_freebusy() {
1.8 + person_script "$TEMPLATES/fb-request-person-all.txt" "init_fb.tmp"
1.9 +
1.10 + # Expect a reply with no periods.
1.11 +
1.12 + is_present 'METHOD:REPLY' "init_fb.tmp" \
1.13 + && is_absent '^FREEBUSY' "init_fb.tmp" \
1.14 + && success || failed "init_fb.tmp"
1.15 +}
1.16 +
1.17 +test_initial_freebusy_limited() {
1.18 + person_script "$TEMPLATES/fb-request-person.txt" "init_fb_limited.tmp"
1.19 +
1.20 + # Expect a reply with no periods.
1.21 +
1.22 + is_present 'METHOD:REPLY' "init_fb_limited.tmp" \
1.23 + && is_absent '^FREEBUSY' "init_fb_limited.tmp" \
1.24 + && success || failed "init_fb_limited.tmp"
1.25 +}
1.26 +
1.27
1.28
1.29 # Test environment initialisation.
2.1 --- a/tests/test_person_invitation.sh Tue Jan 16 23:29:39 2018 +0100
2.2 +++ b/tests/test_person_invitation.sh Thu Jan 18 16:38:23 2018 +0100
2.3 @@ -9,25 +9,10 @@
2.4 echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
2.5 echo 'share' > "$PREFS/$USER/freebusy_sharing"
2.6
2.7 -# Present a free/busy request for all periods to the recipient.
2.8 -
2.9 -person_script "$TEMPLATES/fb-request-person-all.txt" "out0.tmp"
2.10 -
2.11 -# Expect a reply with no periods.
2.12 -
2.13 - is_present 'METHOD:REPLY' "out0.tmp" \
2.14 -&& is_absent '^FREEBUSY' "out0.tmp" \
2.15 -&& success || failed "out0.tmp"
2.16 +# Test the recipient's initial free/busy state.
2.17
2.18 -# Present a free/busy request for periods of interest to the recipient.
2.19 -
2.20 -person_script "$TEMPLATES/fb-request-person.txt" "out1.tmp"
2.21 -
2.22 -# Expect a reply with no periods.
2.23 -
2.24 - is_present 'METHOD:REPLY' "out1.tmp" \
2.25 -&& is_absent '^FREEBUSY' "out1.tmp" \
2.26 -&& success || failed "out1.tmp"
2.27 +test_initial_freebusy
2.28 +test_initial_freebusy_limited
2.29
2.30 # Make a new event.
2.31
3.1 --- a/tests/test_person_invitation_counter.sh Tue Jan 16 23:29:39 2018 +0100
3.2 +++ b/tests/test_person_invitation_counter.sh Thu Jan 18 16:38:23 2018 +0100
3.3 @@ -12,11 +12,9 @@
3.4 echo 'share' > "$PREFS/$USER/freebusy_sharing"
3.5 echo 'PT60S' > "$PREFS/$USER/freebusy_offers"
3.6
3.7 -person_script "$TEMPLATES/fb-request-person-all.txt" "out0.tmp"
3.8 +# Test the recipient's initial free/busy state.
3.9
3.10 - is_present 'METHOD:REPLY' "out0.tmp" \
3.11 -&& is_absent '^FREEBUSY' "out0.tmp" \
3.12 -&& success || failed "out0.tmp"
3.13 +test_initial_freebusy
3.14
3.15 # Make a new event.
3.16