[Rt-commit] [rtir] 02/03: make t/articles tests aware of RT 4.2.11+ skipping the 'in class' page

Jesse Vincent jesse at bestpractical.com
Thu Mar 5 04:19:27 EST 2015


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

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit 0116a7fced0698f09cdd428f9828357736046eb4
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Mar 4 22:58:55 2015 -0800

    make t/articles tests aware of RT 4.2.11+ skipping the 'in class' page
---
 t/articles/basics.t    | 5 ++++-
 t/articles/on-create.t | 4 +++-
 t/articles/on-update.t | 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/t/articles/basics.t b/t/articles/basics.t
index 5538eab..595fb09 100644
--- a/t/articles/basics.t
+++ b/t/articles/basics.t
@@ -19,7 +19,10 @@ $agent->back();
 
 $agent->follow_link_ok({text => "Create", url_regex => qr/Articles/, n => 1}, "followed new article link");
 
-$agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+# RT 4.2.11 forward skip 'pick a class' if there's only one
+if ($agent->content =~ /in class Templates/) {
+    $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+}
 
 $agent->form_name("EditArticle");
 
diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index feb5df6..abcd048 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -18,8 +18,10 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
     $agent->get_ok('/', "followed 'Articles' overview link");
     $agent->follow_link_ok({text => "Articles"}, "followed 'Articles' overview link");
     $agent->follow_link_ok({text => "New Article" }, "followed new article link");
-    $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
 
+    if ($agent->content =~ /in class Templates/) { 
+        $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+    }
     my $cf = RT::CustomField->new( RT->SystemUser );
     $cf->Load('Response');
     ok($cf->id, 'found respone custom field');
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index bb1e3b9..d881cfe 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -16,7 +16,9 @@ diag "create an article" if $ENV{'TEST_VERBOSE'};
     $agent->get_ok('/', "followed 'Articles' overview link");
     $agent->follow_link_ok({text => "Articles"}, "followed 'Articles' overview link");
     $agent->follow_link_ok({text => "New Article" }, "followed new article link");
-    $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+    if ($agent->content =~ /in class Templates/) { 
+        $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+    }
 
     my $cf = RT::CustomField->new( RT->SystemUser );
     $cf->Load('Response');

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


More information about the rt-commit mailing list