2018
[freeside.git] / rt / t / mail / autogenerated.t
1 use strict;
2 use warnings;
3
4 use RT::Test tests => undef;
5 use Email::Abstract;
6
7 my $msg = Email::Abstract->new(<<'MSG')->cast("MIME::Entity");
8 From: somebody@example.com
9 To: rt@example.com
10 Precedence: never-bounce
11 Precedence: bulk
12 Subject: testing precedence
13
14 I am bulk mail, hear me roar!
15 MSG
16
17 ok RT::Interface::Email::CheckForAutoGenerated($msg->head), "Is AutoGenerated";
18
19 $msg->head->delete("Precedence", 1);
20 ok !RT::Interface::Email::CheckForAutoGenerated($msg->head), "Isn't AutoGenerated";
21
22 done_testing;