adds candidate recruitment project label field

completes #93
This commit is contained in:
Mark Moser
2017-02-08 16:05:37 -06:00
parent 5c3691ebe0
commit 58d3fbd7c2
14 changed files with 46 additions and 7 deletions

View File

@ -23,8 +23,13 @@ module Admin
assert_enqueued_jobs 2 do
assert_difference("Candidate.count") do
post admin_create_candidate_path, params: { candidate:
{ name: 'new name', email: 'test@mailinator.com', experience: '0-3', quiz_id: quizzes(:fed).id } }
post admin_create_candidate_path, params: { candidate: {
name: 'new name',
email: 'test@mailinator.com',
experience: '0-3',
project: 'client project',
quiz_id: quizzes(:fed).id
} }
end
end
assert_redirected_to admin_candidates_path

View File

@ -4,6 +4,7 @@ roy: # Roy should have started, and is ready for a reminder
name: Roy Cruz
email: <%= CryptSerializer.dump 'roy.cruz@mailinator.com' %>
experience: 0-3
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -14,6 +15,7 @@ gillian: # Gillian has not begun the test
name: Gillian Anderson
email: <%= CryptSerializer.dump 'gillian.anderson@mailinator.com' %>
experience: 4-6
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -24,6 +26,7 @@ martha: # Martha has not begun the test
name: Martha Watts
email: <%= CryptSerializer.dump 'martha.watts@mailinator.com' %>
experience: 4-6
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -34,6 +37,7 @@ dawn: # Dawn has completed, and been reminded, but not submitted the test
name: Dawn Hopkins
email: <%= CryptSerializer.dump 'dawn.hopkins@mailinator.com' %>
experience: 0-2
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -44,6 +48,7 @@ peggy: # Peggy has completed, and been reminded, but not submitted the test
name: Peggy Blisters
email: <%= CryptSerializer.dump 'peggy.blisters@mailinator.com' %>
experience: 0-2
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -54,6 +59,7 @@ richard: # Richard has completed AND submitted the test
name: Richard Burns
email: <%= CryptSerializer.dump 'richard.burns@mailinator.com' %>
experience: 15+
project: Client/Project
recruiter: recruiter
quiz: fed
completed: true
@ -66,6 +72,7 @@ juan: # Juan has chosen "finish later" for live coders
name: Juan Campbell
email: <%= CryptSerializer.dump 'juan.campbell@mailinator.com' %>
experience: 15+
project: Client/Project
recruiter: recruiter
quiz: fed
completed: false
@ -76,6 +83,7 @@ stacy: # Stacy has completed AND submitted the test
name: Stacy Scott
email: <%= CryptSerializer.dump 'stacy.scott@mailinator.com' %>
experience: 7-9
project: Client/Project
recruiter: recruiter
quiz: fed
completed: true
@ -88,6 +96,7 @@ henry: # Henry has completed AND submitted the test
name: Henry Butler
email: <%= CryptSerializer.dump 'henry.butler@mailinator.com' %>
experience: 4-6
project: Client/Project
recruiter: recruiter
quiz: fed
completed: true
@ -99,6 +108,7 @@ wade: # Wade has completed AND submitted the test
name: Wade Armstrong
email: <%= CryptSerializer.dump 'wade.armstrong@mailinator.com' %>
experience: 0-3
project: Client/Project
recruiter: recruiter
quiz: fed
completed: true
@ -110,6 +120,7 @@ gustov: # Gustov is NOT for FED
name: Gustov
email: <%= CryptSerializer.dump 'gustov@mailinator.com' %>
experience: 0-3
project: Client/Project
recruiter: recruiter
quiz: admin
completed: false

View File

@ -6,6 +6,7 @@ class CandidateTest < ActiveSupport::TestCase
candidate = Candidate.create(name: 'new name',
email: 'test@mailinator.com',
experience: '0-3',
project: 'Client',
quiz_id: quizzes(:fed).id)
assert candidate.test_hash.present?
@ -16,6 +17,7 @@ class CandidateTest < ActiveSupport::TestCase
candidate = Candidate.create(name: 'new name',
email: email,
experience: '0-3',
project: 'Client',
recruiter_id: users(:recruiter).id,
quiz_id: quizzes(:fed).id)