Add group_scores to groups factory, one for every team

This commit is contained in:
Daniel Schädler 2019-05-29 22:41:09 +02:00
parent f54db04eee
commit 8e371fdac7
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,9 @@ FactoryBot.define do
after(:create) do |group, evaluator| after(:create) do |group, evaluator|
create_list(:group_match, evaluator.match_count, group: group) create_list(:group_match, evaluator.match_count, group: group)
group.group_scores = group.teams.map do |team|
create(:group_score, team: team, group: group)
end
end end
end end
end end