mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
15 lines
613 B
Ruby
15 lines
613 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :repository_number_value do
|
|
created_by { create :user }
|
|
last_modified_by { created_by }
|
|
data { Faker::Number.decimal(l_digits: 4, r_digits: 4) }
|
|
after(:build) do |repository_number_value|
|
|
repository_number_value.repository_cell ||= build(:repository_cell,
|
|
:number_value,
|
|
repository_number_value: repository_number_value)
|
|
repository_number_value.repository_cell.value = repository_number_value
|
|
end
|
|
end
|
|
end
|