summaryrefslogtreecommitdiff
path: root/test/t2200-tuvotereminder.sh
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-09-29 20:45:58 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-09-29 22:07:24 +0200
commiteb367d97e28d157036c1bf4f1ee65b0d17d756ea (patch)
treecf087a8a9aaa3a9cb534489ed05132409162db78 /test/t2200-tuvotereminder.sh
parente1709e98ce623aee8062e98a859bcb43553e2faf (diff)
Use the notify script in tests
Instead of only checking whether the notification script is called with the correct parameters, actually invoke the real notify script and check whether proper notifications are generated. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'test/t2200-tuvotereminder.sh')
-rwxr-xr-xtest/t2200-tuvotereminder.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/t2200-tuvotereminder.sh b/test/t2200-tuvotereminder.sh
index 438c0c3..8477c92 100755
--- a/test/t2200-tuvotereminder.sh
+++ b/test/t2200-tuvotereminder.sh
@@ -14,13 +14,12 @@ test_expect_success 'Test Trusted User vote reminders.' '
INSERT INTO TU_VoteInfo (ID, Agenda, User, Submitted, End, Quorum, SubmitterID) VALUES (3, "Lorem ipsum.", "user", 0, $tomorrow, 0.00, 2);
INSERT INTO TU_VoteInfo (ID, Agenda, User, Submitted, End, Quorum, SubmitterID) VALUES (4, "Lorem ipsum.", "user", 0, $threedays, 0.00, 2);
EOD
- >notify.out &&
+ >sendmail.out &&
"$TUVOTEREMINDER" &&
- cat <<-EOD >expected &&
- tu-vote-reminder 2
- tu-vote-reminder 3
- EOD
- test_cmp notify.out expected
+ grep -q "Proposal 2" sendmail.out &&
+ grep -q "Proposal 3" sendmail.out &&
+ test_must_fail grep -q "Proposal 1" sendmail.out &&
+ test_must_fail grep -q "Proposal 4" sendmail.out
'
test_done