Create event factory, and required association factories
This commit is contained in:
parent
a33e930111
commit
cc3ff4837f
4 changed files with 77 additions and 2 deletions
13
spec/factories/event_people.rb
Normal file
13
spec/factories/event_people.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :event_person do
|
||||
person
|
||||
|
||||
Hash[EventPerson::ROLES].values.each do |role|
|
||||
factory role do
|
||||
event_role role
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue