scinote-web/spec/factories/repository_list_values.rb
2019-06-10 12:24:04 +02:00

17 lines
622 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :repository_list_value do
created_by { create :user }
last_modified_by { created_by }
repository_list_item
after(:build) do |repository_list_value|
repository_list_value.repository_cell ||= build(:repository_cell,
:list_value,
repository_list_value: repository_list_value)
repository_list_value.repository_cell.repository_column.repository_list_items <<
repository_list_value.repository_list_item
end
end
end