14873: Fixes deprecation warnings on integration tests.
[arvados.git] / services / api / test / integration / valid_links_test.rb
index ed705fc04dd4d4ceef74fef40d97d48c3a93ea91..1a98a65744275ae2b432f847e3ed5e26e1776da5 100644 (file)
@@ -10,33 +10,39 @@ class ValidLinksTest < ActionDispatch::IntegrationTest
   test "tail must exist on update" do
     admin_auth = {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:admin).api_token}"}
 
-    post "/arvados/v1/links", {
-      :format => :json,
-      :link => {
-        link_class: 'test',
-        name: 'stuff',
-        head_uuid: users(:active).uuid,
-        tail_uuid: virtual_machines(:testvm).uuid
-      }
-    }, admin_auth
+    post "/arvados/v1/links",
+      params: {
+        :format => :json,
+        :link => {
+          link_class: 'test',
+          name: 'stuff',
+          head_uuid: users(:active).uuid,
+          tail_uuid: virtual_machines(:testvm).uuid
+        }
+      },
+      headers: admin_auth
     assert_response :success
     u = json_response['uuid']
 
-    put "/arvados/v1/links/#{u}", {
-      :format => :json,
-      :link => {
-        tail_uuid: virtual_machines(:testvm2).uuid
-      }
-    }, admin_auth
+    put "/arvados/v1/links/#{u}",
+      params: {
+        :format => :json,
+        :link => {
+          tail_uuid: virtual_machines(:testvm2).uuid
+        }
+      },
+      headers: admin_auth
     assert_response :success
     assert_equal virtual_machines(:testvm2).uuid, (ActiveSupport::JSON.decode @response.body)['tail_uuid']
 
-    put "/arvados/v1/links/#{u}", {
-      :format => :json,
-      :link => {
-        tail_uuid: 'zzzzz-tpzed-xyzxyzxerrrorxx'
-      }
-    }, admin_auth
+    put "/arvados/v1/links/#{u}",
+      params: {
+        :format => :json,
+        :link => {
+          tail_uuid: 'zzzzz-tpzed-xyzxyzxerrrorxx'
+        }
+      },
+      headers: admin_auth
     assert_response 422
   end