adding authenticate application helper method

parent 26b12961
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment