Skip to content
Snippets Groups Projects
Commit d00b0982 authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

simple test for multiple reply-to addresses

parent a645597f
No related branches found
No related tags found
No related merge requests found
use strict;
use warnings;
use RT::Test tests => 7;
RT->Config->Set( ParseNewMessageForTicketCcs => 1 );
diag "grant everybody with CreateTicket right";
{
ok( RT::Test->set_rights(
{ Principal => 'Everyone', Right => [qw(CreateTicket)], },
{ Principal => 'Requestor', Right => [qw(ReplyToTicket)], },
), "Granted rights");
}
{
my $text = <<EOF;
From: user\@example.com
Subject: test
Blah!
Foob!
EOF
my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "ticket created");
$text = <<EOF;
From: user\@example.com
Subject: [@{[RT->Config->Get('rtname')]} #$id] test
Blah!
Foob!
EOF
($status, my $tid) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
is ($tid, $id, "ticket updated");
$text = <<EOF;
From: somebody\@example.com
Reply-To: boo\@example.com, user\@example.com
Subject: [@{[RT->Config->Get('rtname')]} #$id] test
Blah!
Foob!
EOF
($status, my $tid) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
is ($tid, $id, "ticket updated");
}
1;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment