update address standardization for cust_location changes
[freeside.git] / rt / t / mail / rfc2231-attachment.t
diff --git a/rt/t/mail/rfc2231-attachment.t b/rt/t/mail/rfc2231-attachment.t
new file mode 100644 (file)
index 0000000..fc74c47
--- /dev/null
@@ -0,0 +1,28 @@
+use strict;
+use warnings;
+
+use utf8;
+use RT::Test tests => undef;
+my ($baseurl, $m) = RT::Test->started_ok;
+ok $m->login, 'logged in as root';
+
+diag "encoded attachment filename with parameter continuations";
+{
+    my $mail = RT::Test->file_content(
+        RT::Test::get_relocatable_file(
+            'rfc2231-attachment-filename-continuations',
+            (File::Spec->updir(), 'data', 'emails')
+        )
+    );
+
+    my ( $status, $id ) = RT::Test->send_via_mailgate($mail);
+    is( $status >> 8, 0, "The mail gateway exited normally" );
+    ok( $id, "Created ticket" );
+
+    $m->get_ok("/Ticket/Display.html?id=$id");
+    $m->content_contains("新しいテキスト ドキュメント.txt", "found full filename");
+}
+
+undef $m;
+done_testing;
+