scinote-web/spec/factories/repository_checklist_values.rb

15 lines
535 B
Ruby
Raw Normal View History

2019-12-06 21:16:20 +08:00
# frozen_string_literal: true
FactoryBot.define do
2019-12-09 20:38:40 +08:00
factory :repository_checklist_value do
2019-12-06 21:16:20 +08:00
created_by { create :user }
last_modified_by { created_by }
2019-12-09 20:38:40 +08:00
repository_checklist_items { [] }
2020-01-10 18:09:47 +08:00
after(:build) do |repository_checklist_value|
repository_checklist_value.repository_cell ||= build(:repository_cell,
:checkbox_value,
repository_checklist_value: repository_checklist_value)
end
2019-12-06 21:16:20 +08:00
end
end