scinote-web/spec/factories/repository_asset_values.rb

15 lines
476 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-03-10 00:04:54 +08:00
FactoryBot.define do
factory :repository_asset_value do
created_by { create :user }
last_modified_by { created_by }
asset
after(:build) do |repository_asset_value|
repository_asset_value.repository_cell ||= build(:repository_cell,
:asset_value,
repository_asset_value: repository_asset_value)
end
2018-03-10 00:04:54 +08:00
end
end