aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2017-01-02 17:35:52 +0000
committerdakkar <dakkar@thenautilus.net>2017-01-02 17:35:52 +0000
commit66061a7ca7849ae147b12bf0aca72bbc70821099 (patch)
tree0eebf9fb02899fa1f8a96e770e507420c8a29afc /t
parentclean all the namespaces (diff)
downloadSietima-66061a7ca7849ae147b12bf0aca72bbc70821099.tar.gz
Sietima-66061a7ca7849ae147b12bf0aca72bbc70821099.tar.bz2
Sietima-66061a7ca7849ae147b12bf0aca72bbc70821099.zip
ReplyTo can set a post address != return path
Diffstat (limited to 't')
-rw-r--r--t/tests/sietima/role/replyto.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/tests/sietima/role/replyto.t b/t/tests/sietima/role/replyto.t
index c502391..bae1bdf 100644
--- a/t/tests/sietima/role/replyto.t
+++ b/t/tests/sietima/role/replyto.t
@@ -42,6 +42,39 @@ subtest 'enabled' => sub {
);
};
+subtest 'enabled, custom post address' => sub {
+ my $post_address = 'the-list@example.com';
+ my $s = make_sietima(
+ with_traits => ['ReplyTo'],
+ munge_reply_to => 1,
+ subscribers => [
+ 'one@users.example.com',
+ 'two@users.example.com',
+ ],
+ post_address => $post_address,
+ );
+
+ is(
+ $s->list_addresses,
+ hash {
+ field return_path => $s->return_path;
+ field post => object {
+ call address => $post_address;
+ };
+ },
+ 'the custom post address should be set for the headers',
+ );
+
+ test_sending(
+ sietima => $s,
+ mails => [
+ object {
+ call [ header_str => 'reply-to' ] => $post_address;
+ },
+ ],
+ );
+};
+
subtest 'enabled for some' => sub {
my $s = make_sietima(
with_traits => ['ReplyTo'],