Add running_group_match factory

This commit is contained in:
Daniel Schädler 2019-04-29 22:11:21 +02:00
parent bfadc7a6af
commit 0f7279de97
1 changed files with 9 additions and 0 deletions

View File

@ -16,5 +16,14 @@ FactoryBot.define do
factory :group_match, class: Match do factory :group_match, class: Match do
group group
factory :running_group_match do
transient do
match_scores_count { 2 }
end
after(:create) do |match, evaluator|
match.match_scores = create_list(:match_score, evaluator.match_scores_count)
end
state { 3 }
end
end end
end end