Add writable_by to Group API response.
[arvados.git] / services / api / test / test_helper.rb
index 3e81ff7432b591482ee20a0ce81af6737d821869..869d87f7db19f24d63743b04d410404ba4379082 100644 (file)
@@ -38,7 +38,7 @@ class ActiveSupport::TestCase
   end
 
   def authorize_with(api_client_auth_name)
-    self.request.env['HTTP_AUTHORIZATION'] = "OAuth2 #{api_token(api_client_auth_name)}"
+    ArvadosApiToken.new.call ({"rack.input" => "", "HTTP_AUTHORIZATION" => "OAuth2 #{api_client_authorizations(api_client_auth_name).api_token}"})
   end
 end