summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2018-08-12 13:41:56 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2018-08-12 13:41:56 +0200
commit8a2f13f8c2e763f657e8e729bc102328a94d0296 (patch)
tree2779097b62629cd1cdc040bf8c946e25f6f1910e
parent0ae1ca15e94e722b544d620e14ec828995820863 (diff)
downloadaur-8a2f13f8c2e763f657e8e729bc102328a94d0296.tar.gz
aur-8a2f13f8c2e763f657e8e729bc102328a94d0296.tar.xz
t2500: add test for disown notifications
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-xtest/t2500-notify.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/t2500-notify.sh b/test/t2500-notify.sh
index 3f5a09c5..c9c72080 100755
--- a/test/t2500-notify.sh
+++ b/test/t2500-notify.sh
@@ -175,6 +175,25 @@ test_expect_success 'Test subject and body of adopt notifications.' '
test_cmp actual expected
'
+test_expect_success 'Test subject and body of disown notifications.' '
+ >sendmail.out &&
+ "$NOTIFY" disown 1 1001 &&
+ grep ^Subject: sendmail.out >actual &&
+ cat <<-EOD >expected &&
+ Subject: AUR Ownership Notification for foobar
+ EOD
+ test_cmp actual expected &&
+ sed -n "/^\$/,\$p" sendmail.out | base64 -d >actual &&
+ echo >>actual &&
+ cat <<-EOD >expected &&
+ The package foobar [1] was disowned by user [2].
+
+ [1] https://aur.archlinux.org/pkgbase/foobar/
+ [2] https://aur.archlinux.org/account/user/
+ EOD
+ test_cmp actual expected
+'
+
test_expect_success 'Test subject and body of co-maintainer addition notifications.' '
>sendmail.out &&
"$NOTIFY" comaintainer-add 1 1001 &&