10524: update test assertions
authorradhika <radhika@curoverse.com>
Tue, 22 Nov 2016 22:41:33 +0000 (17:41 -0500)
committerradhika <radhika@curoverse.com>
Tue, 22 Nov 2016 22:41:33 +0000 (17:41 -0500)
apps/workbench/test/controllers/disabled_api_test.rb

index 1154e4d5e231beb122e84bce1c735b64bd7867ab..47276c02e835419cf89601e78c153f4f5431df21 100644 (file)
@@ -13,7 +13,6 @@ class DisabledApiTest < ActionController::TestCase
     assert_includes @response.body, "zzzzz-xvhdp-cr4runningcntnr" # expect crs
     assert_not_includes @response.body, "zzzzz-d1hrv-"   # expect no pipelines
     assert_includes @response.body, "Run a process"
-    assert_not_includes @response.body, "Run a pipeline"
   end
 
   [
@@ -35,6 +34,7 @@ class DisabledApiTest < ActionController::TestCase
   end
 
   [
+    :admin,
     :active,
     nil,
   ].each do |user|
@@ -60,8 +60,7 @@ class DisabledApiTest < ActionController::TestCase
       assert_includes resp, "href=\"#Pipelines_and_processes\""
       assert_includes resp, "href=\"#Workflows\""
       assert_not_includes resp, "href=\"#Pipeline_templates\""
-      assert_includes @response.body, "Run a process"
-      assert_not_includes @response.body, "Run a pipeline"
+      assert_includes @response.body, "Run a process" if user == :admin
     end
   end
 end