From 4ba7568909fe620ee9fb99cb6bbe058df8c0061c Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 19 Jun 2016 17:55:45 +0100 Subject: AvoidDups role --- t/tests/sietima/role/avoid-dups.t | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 t/tests/sietima/role/avoid-dups.t (limited to 't/tests') diff --git a/t/tests/sietima/role/avoid-dups.t b/t/tests/sietima/role/avoid-dups.t new file mode 100644 index 0000000..997f3fd --- /dev/null +++ b/t/tests/sietima/role/avoid-dups.t @@ -0,0 +1,28 @@ +#!perl +use strict; +use warnings; +use 5.020; +use lib 't/lib'; +use Test::Sietima; + +my $s = make_sietima( + with_traits => ['AvoidDups'], + subscribers => [ + 'one@users.example.com', + 'two@users.example.com', + ], +); + +test_sending( + sietima => $s, + mail => { cc => 'one@users.example.com' }, + to => ['two@users.example.com'], +); + +test_sending( + sietima => $s, + mail => { to => $s->return_path . ' one@users.example.com' }, + to => ['two@users.example.com'], +); + +done_testing; -- cgit v1.2.3