Add a running playoff Match to Match Factory

This commit is contained in:
Daniel Schädler 2018-11-29 11:01:17 +01:00
parent fbb87f5f7c
commit 34159f7e01
1 changed files with 10 additions and 1 deletions

View File

@ -1,8 +1,17 @@
# frozen_string_literal: true # frozen_string_literal: true
FactoryBot.define do FactoryBot.define do
factory :stage_match, aliases: [:match], class: Match do factory :playoff_match, aliases: [:match], class: Match do
stage stage
factory :running_playoff_match do
transient do
scores_count { 2 }
end
after(:create) do |match, evaluator|
match.scores = create_list(:score, evaluator.scores_count)
end
state { 3 }
end
end end
factory :group_match, class: Match do factory :group_match, class: Match do