Skip to content
Snippets Groups Projects
Commit 455abd25 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

adding authenticate application helper method

parent 26b12961
No related branches found
No related tags found
No related merge requests found
......@@ -23,10 +23,15 @@ class ActiveSupport::TestCase
# authenticate requests using devise_token_auth
def auth_request(user)
auth_application
sign_in user
request.headers.merge!(user.create_new_auth_token)
end
def auth_application
@request.headers['PortalMEC-AppID'] = applications(:test_app).application_id
end
def mock
MiniTest::Mock.new
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment