scinote-web/spec/factories/experiments.rb
zmagod 88d7429041 1. fixes failing unit and integration tests
2. fixes gem dependencies issues
3. fixes failing migrations
4. updates depricated factory_girl => factory_bot and fixes related issues

Signed-off-by: zmagod <zmago_devetak@yahoo.com>
2018-01-23 14:54:15 +01:00

26 lines
934 B
Ruby

FactoryBot.define do
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