[Rt-commit] [rtir] 01/01: Fix test failures caused by recent messagebox whitespace changes in RT

Shawn Moore shawn at bestpractical.com
Thu May 12 18:54:47 EDT 2016


This is an automated email from the git hooks/post-receive script.

shawn pushed a commit to branch master
in repository rtir.

commit 5753c13eb71a43fd6e6a55eb7461bdbb09862626
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Thu May 12 22:52:40 2016 +0000

    Fix test failures caused by recent messagebox whitespace changes in RT
    
        Specifically, RT's signature whitespace commit
        9df4d3387e22754f160a5aba91f2e25381309b45 means that the messagebox
        on article create/update may contain whitespace initially.
    
        That commit has prior art for the `is` -> `like` made to RTIR's test
        suite in this commit.
---
 t/articles/on-create.t | 8 ++++----
 t/articles/on-update.t | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index e1092d8..b7cd039 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -44,7 +44,7 @@ foreach ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks' ) {
     my $prefix = $queue->Name eq 'Incidents'? 'InvestigationContent-': '';
 
     $agent->form_name('TicketCreate');
-    is( $agent->field( $content_name ), '' );
+    like( $agent->field( $content_name ), qr/^\s*$/ );
     $agent->field($prefix.'Articles-Include-Article-Named' => $article_name);
     $agent->click('Go');
     $agent->form_name('TicketCreate');
@@ -52,7 +52,7 @@ foreach ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks' ) {
 
     ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
     $agent->form_name('TicketCreate');
-    is( $agent->field( $content_name ), '' );
+    like( $agent->field( $content_name ), qr/^\s*$/ );
     $agent->select($prefix .'Articles-Include-Article-Named-Hotlist' => $article_id);
     $agent->click('Go');
     $agent->form_name('TicketCreate');
@@ -60,11 +60,11 @@ foreach ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks' ) {
 
     ok $agent->goto_create_ticket( $queue ), "UI -> create ticket";
     $agent->form_name('TicketCreate');
-    is( $agent->field( $content_name ), '' );
+    like( $agent->field( $content_name ), qr/^\s*$/ );
     $agent->field($prefix .'Articles_Content' => $article_name);
     $agent->click('Go');
     $agent->form_name('TicketCreate');
-    is( $agent->field( $content_name ), '' );
+    like( $agent->field( $content_name ), qr/^\s*$/ );
     $agent->click($prefix .'Articles-Include-Article-'. $article_id);
     $agent->form_name('TicketCreate');
     like( $agent->field( $content_name ), qr/this is a content/ );
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index a2dc340..015dd9f 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -48,7 +48,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
 
     $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
     $agent->form_name('TicketUpdate');
-    is( $agent->field('UpdateContent'), '' );
+    like( $agent->field('UpdateContent'), qr/^\s*$/ );
     $agent->field('Articles-Include-Article-Named' => $article_name);
     $agent->click('Go');
     $agent->form_name('TicketUpdate');
@@ -57,7 +57,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
     $agent->goto_ticket( $id );
     $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
     $agent->form_name('TicketUpdate');
-    is( $agent->field('UpdateContent'), '' );
+    like( $agent->field('UpdateContent'), qr/^\s*$/ );
     $agent->select('Articles-Include-Article-Named-Hotlist' => $article_id);
     $agent->click('Go');
     $agent->form_name('TicketUpdate');
@@ -66,11 +66,11 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
     $agent->goto_ticket( $id );
     $agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
     $agent->form_name('TicketUpdate');
-    is( $agent->field('UpdateContent'), '' );
+    like( $agent->field('UpdateContent'), qr/^\s*$/ );
     $agent->field('Articles_Content' => $article_name);
     $agent->click('Go');
     $agent->form_name('TicketUpdate');
-    is( $agent->field('UpdateContent'), '' );
+    like( $agent->field('UpdateContent'), qr/^\s*$/ );
     $agent->click('Articles-Include-Article-'. $article_id);
     $agent->form_name('TicketUpdate');
     like( $agent->field('UpdateContent'), qr/this is a content/ );

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list