current_admin to current_user => prep for pundit
This commit is contained in:
@ -26,18 +26,16 @@ module Admin
|
||||
assert_redirected_to admin_url
|
||||
end
|
||||
|
||||
test "recruiter should not admin auth" do
|
||||
test "recruiter should auth to dashboard" do
|
||||
post admin_auth_url, params: { auth:
|
||||
{ email: 'pdr.recruiter@mailinator.com', password: 'password' } }
|
||||
assert_redirected_to admin_login_url
|
||||
assert_match(/incorrect.*email/, flash[:error])
|
||||
assert_redirected_to admin_url
|
||||
end
|
||||
|
||||
test "reviewer should not admin auth" do
|
||||
test "reviewer should auth to dashboard" do
|
||||
post admin_auth_url, params: { auth:
|
||||
{ email: 'fed.reviewer@mailinator.com', password: 'password' } }
|
||||
assert_redirected_to admin_login_url
|
||||
assert_match(/incorrect.*email/, flash[:error])
|
||||
assert_redirected_to admin_url
|
||||
end
|
||||
|
||||
test "should get reset_request" do
|
||||
|
Reference in New Issue
Block a user