scinote-web/spec/factories/repository_columns.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

26 lines
503 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :repository_column do
sequence(:name) { |n| "My column-#{n}" }
created_by { create :user }
repository
data_type :RepositoryTextValue
trait :text_type do
data_type :RepositoryTextValue
end
trait :date_type do
data_type :RepositoryDateValue
end
trait :list_type do
data_type :RepositoryListValue
end
trait :asset_type do
data_type :RepositoryAssetValue
end
end
end