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