Verified Commit 52215d72 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

feat(semester_process_volunteers): add with_mail trait to factory

parent 5b96ddff
......@@ -10,6 +10,13 @@ FactoryBot.define do
mission_type { :assignment }
add_feedbacks { false }
add_hours { false }
add_mail { false }
end
trait :with_mail do
transient do
add_mail { true }
end
end
trait :with_mission do
......@@ -49,6 +56,11 @@ FactoryBot.define do
semester_process_volunteer: spv)
end
end
if evaluator.add_mail
create(:semester_process_mail, semester_process_volunteer: spv, kind: 'mail',
sent_by: spv.semester_process.creator)
end
end
end
end
Supports Markdown
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