From: Don Armstrong Date: Sun, 9 Jul 2017 02:16:26 +0000 (-0700) Subject: add test for multipart mime headers X-Git-Tag: release/2.6.0~89 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=606b62e08af2e41dfac78188d84d4690a9aa1ef5;hp=4225185fc598ac3c92525d6bb8d40456aa136ba6;p=debbugs.git add test for multipart mime headers --- diff --git a/t/20_multipart_mime_pseudoheaders.t b/t/20_multipart_mime_pseudoheaders.t new file mode 100644 index 0000000..f8aae48 --- /dev/null +++ b/t/20_multipart_mime_pseudoheaders.t @@ -0,0 +1,81 @@ +# -*- mode: cperl;-*- + +use Test::More; + +use warnings; +use strict; +use utf8; + +# The test functions are placed here to make things easier +use lib qw(t/lib); +use DebbugsTest qw(:all); +use Data::Dumper; + +my %config = + create_debbugs_configuration(); + +my $sendmail_dir = $config{sendmail_dir}; +my $spool_dir = $config{spool_dir}; + +# We're going to use create mime message to create these messages, and +# then just send them to receive. + +send_message(to=>'submit@bugs.something', + headers => [To => 'submit@bugs.something', + From => 'foo@bugs.something', + Subject => 'Submiting a bug', + ], + body => < [<'1-done@bugs.something', + headers => [To => '1-done@bugs.something', + From => 'foo@bugs.something', + Subject => 'Closing a bug with pseudoheaders', + ], + body => < [<1); +is($status->{done},'foo@bugs.something','bug 1 was closed properly'); +is_deeply($status->{fixed_versions},["1"],'bug 1 was fixed in the proper version'); + +done_testing();