X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8c66c387ddeb1fe5cc19f31fc0e4f24ed778b1f8..1b7d5cef1b7890994826a44102b589124a2a2340:/services/api/test/test_helper.rb diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb index 9955a3500f..a81bfdf9e4 100644 --- a/services/api/test/test_helper.rb +++ b/services/api/test/test_helper.rb @@ -19,3 +19,15 @@ class ActiveSupport::TestCase # Add more helper methods to be used by all tests here... end + +class ActionDispatch::IntegrationTest + def jresponse + @jresponse ||= ActiveSupport::JSON.decode @response.body + end + def auth auth_fixture + {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(auth_fixture).api_token}"} + end +end + +# Ensure permissions are computed from the test fixtures. +User.invalidate_permissions_cache