fix admin/candidate[s] naming
This commit is contained in:
@ -4,7 +4,7 @@ require 'test_helper'
|
||||
module Admin
|
||||
class CandidateControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should require auth or redirect" do
|
||||
get admin_candidate_url
|
||||
get admin_candidates_url
|
||||
assert_redirected_to admin_login_url
|
||||
|
||||
get admin_new_candidate_url
|
||||
@ -16,14 +16,14 @@ module Admin
|
||||
|
||||
test "should get candidate list" do
|
||||
auth_recruiter
|
||||
get admin_candidate_url
|
||||
get admin_candidates_url
|
||||
assert_response :success
|
||||
assert assigns(:candidates), "@candidates not present"
|
||||
end
|
||||
|
||||
test 'should have edit links' do
|
||||
auth_recruiter
|
||||
get admin_candidate_url
|
||||
get admin_candidates_url
|
||||
assert_response :success
|
||||
assert_select "a[href='#{admin_edit_candidate_path(candidates(:martha))}']"
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ module Admin
|
||||
{ name: 'new name', email: 'test@mailinator.com', experience: '0-3', quiz_id: quizzes(:fed).id } }
|
||||
end
|
||||
end
|
||||
assert_redirected_to admin_candidate_path
|
||||
assert_redirected_to admin_candidates_path
|
||||
assert flash[:success]
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@ module Admin
|
||||
|
||||
refute_equal candidate.name, Candidate.find_by(id: candidate.id).name
|
||||
assert_equal candidate.test_hash, Candidate.find_by(id: candidate.id).test_hash
|
||||
assert_redirected_to admin_candidate_url
|
||||
assert_redirected_to admin_candidates_url
|
||||
end
|
||||
|
||||
test 'should redirect to form on fail' do
|
||||
|
Reference in New Issue
Block a user