aboutsummaryrefslogtreecommitdiff
path: root/t/tests/sietima/role/avoid-dups.t
blob: 671d8986acaea5f116be085044029505ebe483d0 (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
#!perl 
use lib 't/lib';
use Test::Sietima;
 
my $s = make_sietima(
    with_traits => ['AvoidDups'],
    subscribers => [
        'one@users.example.com',
        'two@users.example.com',
    ],
);
 
subtest 'in cc' => sub {
    test_sending(
        sietima => $s,
        mail => { cc => 'one@users.example.com' },
        to => ['two@users.example.com'],
    );
};
 
subtest 'in to' => sub {
    test_sending(
        sietima => $s,
        mail => { to => $s->return_path . ' one@users.example.com' },
        to => ['two@users.example.com'],
    );
};
 
done_testing;