[Rt-commit] rt branch, 4.4/signature-spacing-test-fix, created. rt-4.4.0-113-g77ed8ec

Rachel Kelly rachel at bestpractical.com
Tue May 10 18:22:27 EDT 2016


The branch, 4.4/signature-spacing-test-fix has been created
        at  77ed8ec613e1527e70fbd8e011e4898868641885 (commit)

- Log -----------------------------------------------------------------
commit 344a35cf01d302d528851a6774c8006fd52f8108
Author: rachelkelly <rachel at bestpractical.com>
Date:   Thu May 5 07:05:25 2016 +0000

    Add regex to match against date-time-user Quote Header

diff --git a/t/web/signatures.t b/t/web/signatures.t
index becc1f9..ce1a118 100644
--- a/t/web/signatures.t
+++ b/t/web/signatures.t
@@ -4,11 +4,7 @@ use warnings;
 use RT::Test tests => undef;
 use HTML::Entities qw/decode_entities/;
 
-# Remove the timestamp from the quote header
-{
-    no warnings 'redefine';
-    *RT::Transaction::QuoteHeader = sub { "Someone wrote:" };
-}
+# Removed the: Remove the timestamp from the quote header
 
 my ($baseurl, $m) = RT::Test->started_ok;
 ok( $m->login, 'logged in' );
@@ -56,6 +52,8 @@ sub template_is {
     my $display = $value;
     $display =~ s/^$/./mg;
     $display =~ s/([ ]+)$/$1\$/mg;
+    $display =~ s/On .* wrote:/Someone wrote:/;
+
 
     is($display, $expected, "Content matches expected");
 

commit 77ed8ec613e1527e70fbd8e011e4898868641885
Author: rachelkelly <rachel at bestpractical.com>
Date:   Thu May 5 07:21:02 2016 +0000

    Fix failing FastCGI tests by changing how timestamps are removed from quote header
    
        From problematic commit 391c86194e3bcb07e682878cd163e0b9b7cd69cf
        which included faulty test re the timestamps added to headers.
    
        Added regex to match against timestamp so that the test would
        not pick it up - the timestamp will be different every time so
        it was necessary to elide past it.

diff --git a/t/web/signatures.t b/t/web/signatures.t
index ce1a118..7151efd 100644
--- a/t/web/signatures.t
+++ b/t/web/signatures.t
@@ -4,8 +4,6 @@ use warnings;
 use RT::Test tests => undef;
 use HTML::Entities qw/decode_entities/;
 
-# Removed the: Remove the timestamp from the quote header
-
 my ($baseurl, $m) = RT::Test->started_ok;
 ok( $m->login, 'logged in' );
 
@@ -49,11 +47,11 @@ sub template_is {
 
     # For ease of interpretation, replace blank lines with dots, and
     # put a $ after trailing whitespace.
+    # Remove the timestamp from the quote header
     my $display = $value;
     $display =~ s/^$/./mg;
     $display =~ s/([ ]+)$/$1\$/mg;
-    $display =~ s/On .* wrote:/Someone wrote:/;
-
+    $display =~ s/On \w\w\w \w\w\w \d\d \d\d:\d\d:\d\d \d\d\d\d, \w+:/Someone wrote:/
 
     is($display, $expected, "Content matches expected");
 

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


More information about the rt-commit mailing list