Commit 6208acaa authored by Jiri Strojil's avatar Jiri Strojil

Fixed test

parent c85bf585
Pipeline #32340 passed with stage
in 49 minutes and 27 seconds
......@@ -49,7 +49,13 @@ FactoryBot.define do
mission: create(ev.mission_type || :assignment, volunteer: spv.volunteer))
end
if ev.add_mail
create(:semester_process_mail, semester_process_volunteer: spv, kind: 'mail',
sent_by: spv.semester_process.creator)
end
if ev.add_feedbacks
spv.reload
spv.semester_process_volunteer_missions.map do |sem_proc_mission|
create(:semester_feedback, mission: sem_proc_mission.mission,
semester_process_volunteer: spv)
......@@ -61,11 +67,6 @@ FactoryBot.define do
create(:hour, hourable: sem_proc_mission.mission)
end
end
if ev.add_mail
create(:semester_process_mail, semester_process_volunteer: spv, kind: 'mail',
sent_by: spv.semester_process.creator)
end
end
end
end
......@@ -19,7 +19,7 @@ FactoryBot.define do
after(:create) do |sem_proc, evaluator|
if evaluator.build_volunteers
evaluator.volunteers_count.times do
create :semester_process_volunteer, :with_mission, :with_feedbacks, semester_process: sem_proc
create :semester_process_volunteer, :with_mission, :with_feedbacks, :with_mail, semester_process: sem_proc
end
end
end
......
......@@ -7,7 +7,7 @@ class SemesterProcessVolunteersTest < ApplicationSystemTestCase
@two_semesters_back = create :semester_process, :with_volunteers, semester: @current_semester.previous_s(2)
@three_semesters_back = create :semester_process, :with_volunteers, semester: @current_semester.previous_s(3)
login_as create(:user)
visit semester_process_volunteers_path
visit semester_process_volunteers_path(semester: Semester.to_s(@one_semester_back.semester))
end
test 'filter semester process volunteer shows previous semester by default' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment