RT 4.0.22
[freeside.git] / rt / t / mail / rfc2231-attachment.t
1 use strict;
2 use warnings;
3
4 use RT::Test tests => undef;
5 my ($baseurl, $m) = RT::Test->started_ok;
6 ok $m->login, 'logged in as root';
7
8 diag "encoded attachment filename with parameter continuations";
9 {
10     my $mail = RT::Test->file_content(
11         RT::Test::get_relocatable_file(
12             'rfc2231-attachment-filename-continuations',
13             (File::Spec->updir(), 'data', 'emails')
14         )
15     );
16
17     my ( $status, $id ) = RT::Test->send_via_mailgate($mail);
18     is( $status >> 8, 0, "The mail gateway exited normally" );
19     ok( $id, "Created ticket" );
20
21     $m->get_ok("/Ticket/Display.html?id=$id");
22     $m->content_contains(Encode::decode("UTF-8","新しいテキスト ドキュメント.txt"), "found full filename");
23 }
24
25 undef $m;
26 done_testing;
27