skill-assessment-app/test/test_helpers/auth_test_helper.rb
2017-05-04 13:01:02 -05:00

32 lines
850 B
Ruby

# frozen_string_literal: true
module AuthTestHelper
def auth_candidate candidate
post validate_candidate_url, params: { test_id: candidate.test_hash }
end
def auth_user user
post admin_auth_url, params: { auth:
{ email: user.email, password: 'password' } }
end
def auth_admin
post admin_auth_url, params: { auth:
{ email: 'alan.admin@mailinator.com', password: 'password' } }
end
def auth_manager
post admin_auth_url, params: { auth:
{ email: 'mary.manager@mailinator.com', password: 'password' } }
end
def auth_recruiter
post admin_auth_url, params: { auth:
{ email: 'pda.recruiter@mailinator.com', password: 'password' } }
end
def auth_reviewer
post admin_auth_url, params: { auth:
{ email: 'fed.reviewer@mailinator.com', password: 'password' } }
end
end