From: Baptiste Daroussin Date: Wed, 8 Dec 2021 16:29:38 +0000 (+0100) Subject: mlmmj-sub: add a test for auto unsubscription on subscruption X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c876978b71dca4cc8b392f57c0c3d88dd9327ff2;p=thirdparty%2Fmlmmj.git mlmmj-sub: add a test for auto unsubscription on subscruption --- diff --git a/tests/mlmmj-sub.sh b/tests/mlmmj-sub.sh index 6d513b4e..d02c9a2d 100644 --- a/tests/mlmmj-sub.sh +++ b/tests/mlmmj-sub.sh @@ -7,6 +7,7 @@ tests_init \ add_normal_owner \ add_nomail \ add_digest \ + add_normal_then_nomail \ remove_normal \ remove_normal_owner \ remove_nomail \ @@ -24,6 +25,20 @@ add_normal_body() atf_check -o inline:"john@doe.org\njane@doe.org\n" cat ml/subscribers.d/j } +add_normal_then_nomail_body() +{ + init_ml ml + mlmmjsub=$(command -v mlmmj-sub) + echo test@mlmmjtest > ml/control/listaddress + atf_check -s exit:0 $mlmmjsub -L ml -a john@doe.org + atf_check -o inline:"john@doe.org\n" cat ml/subscribers.d/j + atf_check -s exit:0 $mlmmjsub -L ml -n -a john@doe.org + atf_check -o inline:"john@doe.org\n" cat ml/nomailsubs.d/j + if [ -f ml/subscribers.d/j ]; then + atf_fail "John Doe still subscribed" + fi +} + add_normal_owner_body() { init_ml ml