diff options
author | dakkar <dakkar@thenautilus.net> | 2017-02-14 22:22:56 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2017-02-14 22:22:56 +0000 |
commit | 714da2b50f0b027abe4b5b759c5fa3bbd3815089 (patch) | |
tree | 449103c1c56e346c935e9c7d996709d31cddb083 /t/tests | |
parent | more POD (diff) | |
download | Sietima-714da2b50f0b027abe4b5b759c5fa3bbd3815089.tar.gz Sietima-714da2b50f0b027abe4b5b759c5fa3bbd3815089.tar.bz2 Sietima-714da2b50f0b027abe4b5b759c5fa3bbd3815089.zip |
new role: ManualSubscription
Diffstat (limited to 't/tests')
-rw-r--r-- | t/tests/sietima/role/manualsubscription.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/tests/sietima/role/manualsubscription.t b/t/tests/sietima/role/manualsubscription.t new file mode 100644 index 0000000..f99805d --- /dev/null +++ b/t/tests/sietima/role/manualsubscription.t @@ -0,0 +1,31 @@ +#!perl +use lib 't/lib'; +use Test::Sietima; + +my $s = make_sietima( + with_traits => ['Headers','ManualSubscription'], + name => 'test-list', + owner => 'owner@example.com', + subscribers => [ + 'one@users.example.com', + 'two@users.example.com', + ], +); + +subtest '(un)sub headers should be added' => sub { + test_sending( + sietima => $s, + mails => [ + object { + call sub { +{ shift->header_str_pairs } } => hash { + field 'List-Subscribe' => '<mailto:owner@example.com?subject=Please+add+me+to+test-list>'; + field 'List-Unsubscribe' => '<mailto:owner@example.com?subject=Please+remove+me+from+test-list>'; + + etc; + }; + }, + ], + ); +}; + +done_testing; |