[Rt-commit] rtir branch, 3.4/fix-constituency-modal-test, created. 3.3.0-168-g1977e8b

Dustin Graves dustin at bestpractical.com
Thu May 26 11:01:38 EDT 2016


The branch, 3.4/fix-constituency-modal-test has been created
        at  1977e8b0ca1f4397c5e6c7eaf4d7474a28c60ef4 (commit)

- Log -----------------------------------------------------------------
commit f19aa781d8efa0236fae344d93899362ac1ee92c
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Thu May 26 14:59:13 2016 +0000

    switch constituency modal test to new RT::IR::ConstituencyManager

diff --git a/t/constituency/modal.t b/t/constituency/modal.t
index b1affeb..a9fde18 100644
--- a/t/constituency/modal.t
+++ b/t/constituency/modal.t
@@ -13,7 +13,8 @@ my ($ok, $msg);
 diag "create constituencies EDUNET and GOVNET" if $ENV{'TEST_VERBOSE'};
 {
     for my $constituency_name ( qw(EDUNET GOVNET) ) {
-        ok !system("bin/add_constituency --quiet --force --name $constituency_name 2>&1"), "add_constituency $constituency_name ran successfully";
+        my $manager = RT::IR::ConstituencyManager->new(Constituency => $constituency_name);
+        ok($manager->AddConstituency, "added constituency $constituency_name");
     }
 }
 

commit 1977e8b0ca1f4397c5e6c7eaf4d7474a28c60ef4
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Thu May 26 15:00:09 2016 +0000

    finish switching constituency modal test to Countermeasures from Blocks
    
    in 022944d this was attempted for t/constituency/modal.t, but the
    lifecycles were missed as well as the test description

diff --git a/t/constituency/modal.t b/t/constituency/modal.t
index a9fde18..43852f0 100644
--- a/t/constituency/modal.t
+++ b/t/constituency/modal.t
@@ -51,10 +51,10 @@ diag "check queue visibility in modal" if $ENV{'TEST_VERBOSE'};
     $m->content_like(qr{<option value="\d+">Investigations - EDUNET</option>}, 'Queue dropdown has EDUNET investigations queue');
     $m->content_like(qr{<option value="\d+">Investigations - GOVNET</option>}, 'Queue dropdown has GOVNET investigations queue');
 
-    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=blocks");
-    $m->content_like(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown has standard blocks queue');
-    $m->content_like(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown has EDUNET blocks queue');
-    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET blocks queue');
+    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=countermeasures");
+    $m->content_like(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown has standard countermeasures queue');
+    $m->content_like(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown has EDUNET countermeasures queue');
+    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET countermeasures queue');
 }
 
 diag "check queue visibility in modal when created from incident" if $ENV{'TEST_VERBOSE'};
@@ -76,10 +76,10 @@ diag "check queue visibility in modal when created from incident" if $ENV{'TEST_
     $m->content_unlike(qr{<option value="\d+">Investigations</option>}, 'Queue dropdown doesn\'t have standard investigations queue');
     $m->content_unlike(qr{<option value="\d+">Investigations - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET investigations queue');
 
-    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=blocks&Incident=".$i->id);
-    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET blocks queue');
+    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=countermeasures&Incident=".$i->id);
+    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET countermeasures queue');
 }
 
 diag "check queue visibility in modal when created from incident report" if $ENV{'TEST_VERBOSE'};
@@ -129,10 +129,10 @@ diag "check queue visibility in modal - eduhandler" if $ENV{'TEST_VERBOSE'};
     $m->content_unlike(qr{<option value="\d+">Investigations</option>}, 'Queue dropdown doesn\'t have standard investigations queue');
     $m->content_unlike(qr{<option value="\d+">Investigations - GOVNET</option>}, 'Queue dropdown doesn\'t have GOVNET investigations queue');
 
-    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=blocks");
-    $m->content_like(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown has EDUNET blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown doesn\'t have GOVNET blocks queue');
+    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=countermeasures");
+    $m->content_like(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown has EDUNET countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown doesn\'t have GOVNET countermeasures queue');
 }
 
 diag "check queue visibility in modal - govhandler" if $ENV{'TEST_VERBOSE'};
@@ -154,10 +154,10 @@ diag "check queue visibility in modal - govhandler" if $ENV{'TEST_VERBOSE'};
     $m->content_unlike(qr{<option value="\d+">Investigations - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET investigations queue');
     $m->content_unlike(qr{<option value="\d+">Investigations</option>}, 'Queue dropdown doesn\'t have standard investigations queue');
 
-    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=blocks");
-    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET blocks queue');
-    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard blocks queue');
+    $m->get("$baseurl/RTIR/Helpers/CreateInRTIRQueueModal?Lifecycle=countermeasures");
+    $m->content_like(qr{<option value="\d+">Countermeasures - GOVNET</option>}, 'Queue dropdown has GOVNET countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures - EDUNET</option>}, 'Queue dropdown doesn\'t have EDUNET countermeasures queue');
+    $m->content_unlike(qr{<option value="\d+">Countermeasures</option>}, 'Queue dropdown doesn\'t have standard countermeasures queue');
 }
 
 undef $m;

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


More information about the rt-commit mailing list