scinote-web/spec/factories/my_modules.rb

13 lines
371 B
Ruby
Raw Normal View History

2019-01-10 01:30:33 +08:00
# frozen_string_literal: true
FactoryBot.define do
2017-07-28 16:14:50 +08:00
factory :my_module do
2019-01-10 01:30:33 +08:00
sequence(:name) { |n| "Task-#{n}" }
x { Faker::Number.between(1, 100) }
y { Faker::Number.between(1, 100) }
2019-01-11 17:16:50 +08:00
workflow_order { MyModule.where(experiment_id: experiment.id).count + 1 }
2019-01-10 01:30:33 +08:00
experiment
my_module_group { create :my_module_group, experiment: experiment }
2017-07-28 16:14:50 +08:00
end
end