blob: ade20624fe5073cafbbc908d5b40e0cc7652529c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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_raw_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;
|