update fixtures and tests to include second department/quiz
This commit is contained in:
parent
255e430abd
commit
47054265c8
@ -25,7 +25,7 @@ module Admin
|
||||
auth_recruiter
|
||||
get admin_candidates_url
|
||||
assert_response :success
|
||||
assert_select "a[href='#{admin_edit_candidate_path(candidates(:martha))}']"
|
||||
assert_select "a[href='#{admin_edit_candidate_path(candidates(:gillian))}']"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
88
test/fixtures/answers.yml
vendored
88
test/fixtures/answers.yml
vendored
@ -698,8 +698,8 @@ wade10:
|
||||
|
||||
jorge1:
|
||||
candidate: jorge
|
||||
question: Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
||||
answer: option 3
|
||||
question: fed1
|
||||
answer: Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 36.hours - 22.minutes %>
|
||||
@ -890,3 +890,87 @@ elsie10:
|
||||
created_at: <%= DateTime.now() - 36.hours - 40.minutes %>
|
||||
updated_at: <%= DateTime.now() - 36.hours - 20.minutes %>
|
||||
|
||||
|
||||
##########################
|
||||
############# Studio Quiz
|
||||
ethan1:
|
||||
candidate: ethan
|
||||
question: studio1
|
||||
answer: Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 36.hours - 22.minutes %>
|
||||
updated_at: <%= DateTime.now() - 36.hours - 22.minutes %>
|
||||
|
||||
ethan2:
|
||||
candidate: ethan
|
||||
question: studio2
|
||||
answer: Vestibulum id ligula porta felis euismod semper.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 36.hours - 24.minutes %>
|
||||
updated_at: <%= DateTime.now() - 36.hours - 4.minutes %>
|
||||
|
||||
ethan3:
|
||||
candidate: ethan
|
||||
question: studio3
|
||||
answer: Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nulla vitae elit libero, a pharetra augue.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 36.hours - 26.minutes %>
|
||||
updated_at: <%= DateTime.now() - 36.hours - 6.minutes %>
|
||||
|
||||
adele1:
|
||||
candidate: adele
|
||||
question: studio1
|
||||
answer: Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 16.hours - 22.minutes %>
|
||||
updated_at: <%= DateTime.now() - 16.hours - 22.minutes %>
|
||||
|
||||
adele2:
|
||||
candidate: adele
|
||||
question: studio2
|
||||
answer: Vestibulum id ligula porta felis euismod semper.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 16.hours - 24.minutes %>
|
||||
updated_at: <%= DateTime.now() - 16.hours - 4.minutes %>
|
||||
|
||||
adele3:
|
||||
candidate: adele
|
||||
question: studio3
|
||||
answer: Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nulla vitae elit libero, a pharetra augue.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 16.hours - 26.minutes %>
|
||||
updated_at: <%= DateTime.now() - 16.hours - 6.minutes %>
|
||||
|
||||
carl1:
|
||||
candidate: carl
|
||||
question: studio1
|
||||
answer: Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 22.minutes %>
|
||||
updated_at: <%= DateTime.now() - 22.minutes %>
|
||||
|
||||
carl2:
|
||||
candidate: carl
|
||||
question: studio2
|
||||
answer: Vestibulum id ligula porta felis euismod semper.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 24.minutes %>
|
||||
updated_at: <%= DateTime.now() - 4.minutes %>
|
||||
|
||||
carl3:
|
||||
candidate: carl
|
||||
question: studio3
|
||||
answer: Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nulla vitae elit libero, a pharetra augue.
|
||||
saved: 0
|
||||
submitted: true
|
||||
created_at: <%= DateTime.now() - 26.minutes %>
|
||||
updated_at: <%= DateTime.now() - 6.minutes %>
|
||||
|
||||
|
39
test/fixtures/candidates.yml
vendored
39
test/fixtures/candidates.yml
vendored
@ -179,3 +179,42 @@ gustov: # Gustov is NOT for FED
|
||||
reminded: false
|
||||
test_hash: kp6tfghjyapJnkz2N
|
||||
|
||||
ethan: # Completed quiz for studio
|
||||
name: Ethan Woodward
|
||||
email: <%= CryptSerializer.dump 'ethan.woodward@mailinator.com' %>
|
||||
experience: 0-3
|
||||
project: Studio Client
|
||||
position: 'full-time'
|
||||
skill_needs: 'Angular, HTML'
|
||||
recruiter: recruiter
|
||||
quiz: studio
|
||||
completed: true
|
||||
reminded: false
|
||||
test_hash: vNgQo2c5/HZL2CN
|
||||
|
||||
adele: # Completed quiz for studio
|
||||
name: Adele Kearney
|
||||
email: <%= CryptSerializer.dump 'adele.kearney@mailinator.com' %>
|
||||
experience: 0-3
|
||||
project: Studio Client
|
||||
position: 'full-time'
|
||||
skill_needs: 'Angular, HTML'
|
||||
recruiter: recruiter
|
||||
quiz: studio
|
||||
completed: true
|
||||
reminded: false
|
||||
test_hash: 37GmHL0Odjwv
|
||||
|
||||
carl: # Completed quiz for studio
|
||||
name: Carl Mitchell
|
||||
email: <%= CryptSerializer.dump 'carle.mitchell@mailinator.com' %>
|
||||
experience: 0-3
|
||||
project: Studio Client
|
||||
position: 'full-time'
|
||||
skill_needs: 'Angular, HTML'
|
||||
recruiter: recruiter
|
||||
quiz: studio
|
||||
completed: true
|
||||
reminded: false
|
||||
test_hash: hANPsTL1XHcmi
|
||||
|
||||
|
29
test/fixtures/questions.yml
vendored
29
test/fixtures/questions.yml
vendored
@ -150,3 +150,32 @@ admin1:
|
||||
sort: 0
|
||||
active: true
|
||||
|
||||
|
||||
studio1:
|
||||
quiz: studio
|
||||
question: 'Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum.'
|
||||
category: Ipsum
|
||||
input_type: text
|
||||
input_options:
|
||||
sort: 0
|
||||
active: true
|
||||
|
||||
studio2:
|
||||
quiz: studio
|
||||
question: 'Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum.'
|
||||
category: Magna
|
||||
input_type: text
|
||||
input_options:
|
||||
sort: 0
|
||||
active: true
|
||||
|
||||
|
||||
studio3:
|
||||
quiz: studio
|
||||
question: 'Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum.'
|
||||
category: Commodo
|
||||
input_type: text
|
||||
input_options:
|
||||
sort: 0
|
||||
active: true
|
||||
|
||||
|
11
test/fixtures/quizzes.yml
vendored
11
test/fixtures/quizzes.yml
vendored
@ -1,11 +1,16 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
fed:
|
||||
name: PDR Standard FED Screening
|
||||
unit: PDR
|
||||
name: PDA Standard FED Screening
|
||||
unit: PD Agency
|
||||
dept: FED
|
||||
|
||||
admin:
|
||||
name: An extra quiz not assigned to anyone
|
||||
unit: PDR
|
||||
unit: PD
|
||||
dept: NOPE
|
||||
|
||||
studio:
|
||||
name: Studio Screening One
|
||||
unit: PD Studio
|
||||
dept: FED
|
||||
|
8
test/fixtures/reviewer_to_quizzes.yml
vendored
8
test/fixtures/reviewer_to_quizzes.yml
vendored
@ -11,3 +11,11 @@ two:
|
||||
three:
|
||||
user: manager
|
||||
quiz: fed
|
||||
|
||||
four:
|
||||
user: studio_manager
|
||||
quiz: studio
|
||||
|
||||
five:
|
||||
user: studio_reviewer
|
||||
quiz: studio
|
||||
|
26
test/fixtures/reviewer_votes.yml
vendored
26
test/fixtures/reviewer_votes.yml
vendored
@ -93,3 +93,29 @@ reviewer2_elsie:
|
||||
candidate: elsie
|
||||
user: reviewer2
|
||||
|
||||
|
||||
studio_reviewer_carle:
|
||||
candidate: carle
|
||||
user: studio_reviewer
|
||||
|
||||
studio_reviewer_ethan:
|
||||
candidate: ethan
|
||||
user: studio_reviewer
|
||||
|
||||
studio_reviewer_adele:
|
||||
candidate: adele
|
||||
user: studio_reviewer
|
||||
|
||||
|
||||
studio_manager_carle:
|
||||
candidate: carle
|
||||
user: studio_manager
|
||||
|
||||
studio_manager_ethan:
|
||||
candidate: ethan
|
||||
user: studio_manager
|
||||
|
||||
studio_manager_adele:
|
||||
user: studio_manager
|
||||
candidate: adele
|
||||
|
||||
|
13
test/fixtures/users.yml
vendored
13
test/fixtures/users.yml
vendored
@ -29,3 +29,16 @@ admin:
|
||||
email: alan.admin@mailinator.com
|
||||
password_digest: <%= BCrypt::Password.create("password", cost: 4) %>
|
||||
role: admin
|
||||
|
||||
studio_manager:
|
||||
name: Studio Manager
|
||||
email: studio.manager@mailinator.com
|
||||
password_digest: <%= BCrypt::Password.create("password", cost: 4) %>
|
||||
role: manager
|
||||
|
||||
studio_reviewer:
|
||||
name: Studio Reviewer
|
||||
email: studio.reviewer@mailinator.com
|
||||
password_digest: <%= BCrypt::Password.create("password", cost: 4) %>
|
||||
role: reviewer
|
||||
|
||||
|
@ -14,7 +14,7 @@ class ReviewerVoteTest < ActiveSupport::TestCase
|
||||
|
||||
test "manager has a vote for every completed quiz" do
|
||||
manager = users(:manager)
|
||||
completed_count = Candidate.where(completed: true).count
|
||||
completed_count = 6
|
||||
|
||||
assert_equal completed_count, manager.votes.size
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ require 'test_helper'
|
||||
class ReviewerReminderTest < ActiveSupport::TestCase
|
||||
test "collection is created with results" do
|
||||
reminders = ReviewerReminder.new
|
||||
assert_equal 6, reminders.size
|
||||
assert_equal 8, reminders.size
|
||||
end
|
||||
|
||||
test "each reminder has needed attributes" do
|
||||
|
Loading…
Reference in New Issue
Block a user