X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6a0ce3e88fc2122fe7749b6e4bc3eb01fb37b97c..7e8f99556391cc81c014b517a9fa6efed8fe8113:/services/api/test/test_helper.rb diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb index a4c1445f3b..286cf66f28 100644 --- a/services/api/test/test_helper.rb +++ b/services/api/test/test_helper.rb @@ -21,6 +21,10 @@ class ActiveSupport::TestCase self.request.headers["Accept"] = "text/json" end + def json_response + @json_response ||= ActiveSupport::JSON.decode @response.body + end + def authorize_with(api_client_auth_name) self.request.env['HTTP_AUTHORIZATION'] = "OAuth2 #{api_client_authorizations(api_client_auth_name).api_token}" end @@ -38,10 +42,6 @@ class ActionDispatch::IntegrationTest Thread.current[:user] = nil end - def jresponse - @jresponse ||= ActiveSupport::JSON.decode @response.body - end - def auth auth_fixture {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(auth_fixture).api_token}"} end