scinote-web/spec/factories/experiments.rb

27 lines
934 B
Ruby
Raw Normal View History

FactoryBot.define do
2017-07-28 16:14:50 +08:00
factory :experiment do
name 'My Experiment'
description 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'
end
factory :experiment_one, class: Experiment do
name 'My Experiment One'
description 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'
association :project, factory: :project
association :created_by, factory: :user, email: Faker::Internet.email
association :last_modified_by,
factory: :user,
email: Faker::Internet.email
end
factory :experiment_two, class: Experiment do
name Faker::Name.name
description 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'
association :project, factory: :project
association :created_by, factory: :user, email: Faker::Internet.email
association :last_modified_by,
factory: :user,
email: Faker::Internet.email
end
end