X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/10c1e7359286edd6562c52304e9706449a9ee53f..12932812e109e21e76a69b0a9f52533cdc76ea5d:/services/api/test/integration/cross_origin_test.rb diff --git a/services/api/test/integration/cross_origin_test.rb b/services/api/test/integration/cross_origin_test.rb index 5109ea46a6..e3099f1573 100644 --- a/services/api/test/integration/cross_origin_test.rb +++ b/services/api/test/integration/cross_origin_test.rb @@ -15,19 +15,19 @@ class CrossOriginTest < ActionDispatch::IntegrationTest %w(/login /logout /auth/example/callback /auth/joshid).each do |path| test "OPTIONS requests are refused at #{path}" do - options path, {}, {} + options path, params: {}, headers: {} assert_no_cors_headers end test "CORS headers do not exist at GET #{path}" do - get path, {}, {} + get path, params: {}, headers: {} assert_no_cors_headers end end %w(/discovery/v1/apis/arvados/v1/rest).each do |path| test "CORS headers are set at GET #{path}" do - get path, {}, {} + get path, params: {}, headers: {} assert_response :success assert_cors_headers end @@ -37,14 +37,14 @@ class CrossOriginTest < ActionDispatch::IntegrationTest '/arvados/v1/users', '/arvados/v1/api_client_authorizations'].each do |path| test "CORS headers are set and body is empty at OPTIONS #{path}" do - options path, {}, {} + options path, params: {}, headers: {} assert_response :success assert_cors_headers assert_equal '', response.body end test "CORS headers are set at authenticated GET #{path}" do - get path, {}, auth(:active_trustedclient) + get path, params: {}, headers: auth(:active_trustedclient) assert_response :success assert_cors_headers end @@ -55,7 +55,7 @@ class CrossOriginTest < ActionDispatch::IntegrationTest # does not grant access to any resources. ['GET', 'POST'].each do |method| test "Session does not work at #{method} #{path}" do - send method.downcase, path, {format: 'json'}, {user_id: 1} + send method.downcase, path, params: {format: 'json'}, headers: {user_id: 1} assert_response 401 assert_cors_headers end