From 714da2b50f0b027abe4b5b759c5fa3bbd3815089 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 14 Feb 2017 22:22:56 +0000 Subject: new role: ManualSubscription --- t/tests/sietima/role/manualsubscription.t | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 t/tests/sietima/role/manualsubscription.t (limited to 't') 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' => ''; + field 'List-Unsubscribe' => ''; + + etc; + }; + }, + ], + ); +}; + +done_testing; -- cgit v1.2.3