[Rt-commit] rt branch, 4.4/email-avoid-long-lines, updated. rt-4.4.4-8-g87bc2add4

? sunnavy sunnavy at bestpractical.com
Wed Mar 27 15:13:05 EDT 2019


The branch, 4.4/email-avoid-long-lines has been updated
       via  87bc2add4ec45df15a0aeeb7b12203df075e31c3 (commit)
      from  eed358f53e28bee8d6f2540f13b9faf7a4951a43 (commit)

Summary of changes:
 t/web/html_template.t | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

- Log -----------------------------------------------------------------
commit 87bc2add4ec45df15a0aeeb7b12203df075e31c3
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 28 03:10:06 2019 +0800

    Test long line emails

diff --git a/t/web/html_template.t b/t/web/html_template.t
index 75da593da..17d0c3e63 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -70,4 +70,26 @@ diag('test real mail outgoing') if $ENV{TEST_VERBOSE};
     like( $mail, qr!<h1>$quoted_content</h1>!,     'mail has ticket html content <h1>$content</h1>' );
 }
 
+diag('test long line mails') if $ENV{TEST_VERBOSE};
+{
+    $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' );
+
+    $m->submit_form(
+        form_name => 'TicketCreate',
+        fields    => {
+            Subject     => $subject,
+            Content     => 'a' x 1000,
+            ContentType => 'text/html',
+        },
+    );
+    $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
+    $m->follow_link( text => 'Show' );
+    $m->content_contains( $template, "html has $template" );
+    $m->content_contains( $subject,  "html has ticket subject $subject" );
+    $m->text_contains( 'a' x 1000, "html has 1000 continuous a" );
+    my ($mail) = RT::Test->fetch_caught_mails;
+    ok( $mail =~ /Content-Transfer-Encoding: quoted-printable/, 'mail is quoted-printable encoded' );
+    ok( $mail !~ /a{1000}/,                                     'mail lacks 1000 continuous a' );
+}
+
 done_testing;

-----------------------------------------------------------------------


More information about the rt-commit mailing list