projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include privileged attributes in node#ping response
[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 8bf1192ffec252a4562218bdf299891a319b9cb9..9955a3500ffe9830c41974679954e6956c6f4f21 100644
(file)
--- a/
services/api/test/test_helper.rb
+++ b/
services/api/test/test_helper.rb
@@
-9,5
+9,13
@@
class ActiveSupport::TestCase
# -- they do not yet inherit this setting
fixtures :all
# -- they do not yet inherit this setting
fixtures :all
+ def expect_json
+ self.request.headers["Accept"] = "text/json"
+ end
+
+ def authorize_with(api_client_auth_name)
+ self.request.env['HTTP_AUTHORIZATION'] = "OAuth2 #{api_client_authorizations(api_client_auth_name).api_token}"
+ end
+
# Add more helper methods to be used by all tests here...
end
# Add more helper methods to be used by all tests here...
end