scinote-web/spec/factories/repository_date_values.rb
Urban Rotnik 3adf2bb736 Add factories and validation tests for repositories and related models
Repositories, cells, columns, values (date, text, asset, list), rows, items
2019-06-10 12:24:02 +02:00

14 lines
480 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :repository_date_value do
created_by { create :user }
last_modified_by { created_by }
data { Time.now }
after(:build) do |repository_date_value|
repository_date_value.repository_cell ||= build(:repository_cell,
:date_value,
repository_date_value: repository_date_value)
end
end
end