3889: split the test "update a job without failing script_version check" into two...
authorradhika <radhika@curoverse.com>
Thu, 25 Sep 2014 16:54:35 +0000 (12:54 -0400)
committerradhika <radhika@curoverse.com>
Thu, 25 Sep 2014 16:54:35 +0000 (12:54 -0400)
services/api/test/functional/arvados/v1/jobs_controller_test.rb

index 03ee3df2e263b36895b28a48cc90787bac36ba39..ca6112a5dd9a44d961725f1a596ce48e910e0e4b 100644 (file)
@@ -102,22 +102,17 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase
     assert_not_nil job['cancelled_at'], 'un-cancelled job stays cancelled'
   end
 
-  test "update a job without failing script_version check" do
-    authorize_with :admin
-    put :update, {
-      id: jobs(:uses_nonexistent_script_version).uuid,
-      job: {
-        owner_uuid: users(:admin).uuid
-      }
-    }
-    assert_response :success
-    put :update, {
-      id: jobs(:uses_nonexistent_script_version).uuid,
-      job: {
-        owner_uuid: users(:active).uuid
+  ['admin', 'active'].each do |user|
+    test "#{user} update a job without failing script_version check" do
+      authorize_with :admin
+      put :update, {
+        id: jobs(:uses_nonexistent_script_version).uuid,
+        job: {
+          owner_uuid: users(user).uuid
+        }
       }
-    }
-    assert_response :success
+      assert_response :success
+    end
   end
 
   test "search jobs by uuid with >= query" do