Add group_scores to groups factory, one for every team
This commit is contained in:
parent
5809a062a6
commit
133cbffc71
|
|
@ -11,6 +11,9 @@ FactoryBot.define do
|
|||
|
||||
after(:create) do |group, evaluator|
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue