X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2Ft%2F04_send_email.pl;fp=rt%2Flib%2Ft%2F04_send_email.pl;h=973d9d2e215fe8249a7d664120dee6046110c119;hb=32b5d3a31f112a381f0a15ac5e3a2204242f3405;hp=c384eedfa972b8b4f4acbaf86bad976bc5cd85db;hpb=52af7f398d81a374ec63e12b67ac7938fe1e6dac;p=freeside.git diff --git a/rt/lib/t/04_send_email.pl b/rt/lib/t/04_send_email.pl index c384eedfa..973d9d2e2 100644 --- a/rt/lib/t/04_send_email.pl +++ b/rt/lib/t/04_send_email.pl @@ -476,6 +476,31 @@ sub crashes_redef_sendmessage { # }}} +# {{{ test a multi-line RT-Send-CC header + +my $content = `cat /opt/rt3/lib/t/data/rt-send-cc` || die "couldn't find new content"; + +$parser->ParseMIMEEntityFromScalar($content); + + + +my %args = (message => $content, queue => 1, action => 'correspond'); + RT::Interface::Email::Gateway(\%args); +my $tickets = RT::Tickets->new($RT::SystemUser); +$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC'); +$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0'); +my $tick = $tickets->First(); +ok ($tick->Id, "found ticket ".$tick->Id); + +my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc'); +ok ($cc =~ /test1/, "Found test 1"); +ok ($cc =~ /test2/, "Found test 2"); +ok ($cc =~ /test3/, "Found test 3"); +ok ($cc =~ /test4/, "Found test 4"); +ok ($cc =~ /test5/, "Found test 5"); + +# }}} + # Don't taint the environment $everyone->PrincipalObj->RevokeRight(Right =>'SuperUser'); 1;