projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '2449-keep-index-status-handlers'
[arvados.git]
/
services
/
api
/
test
/
test_helper.rb
diff --git
a/services/api/test/test_helper.rb
b/services/api/test/test_helper.rb
index 8c12ffb5df4718df4c5d19dbd5eae5d109da764a..a81bfdf9e40c1bb03af90a274a1fe68645c534b0 100644
(file)
--- a/
services/api/test/test_helper.rb
+++ b/
services/api/test/test_helper.rb
@@
-20,5
+20,14
@@
class ActiveSupport::TestCase
# Add more helper methods to be used by all tests here...
end
# 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
# Ensure permissions are computed from the test fixtures.
User.invalidate_permissions_cache