scinote-web/spec/factories/repository_columns.rb

27 lines
503 B
Ruby
Raw Normal View History

2019-03-07 16:05:35 +08:00
# frozen_string_literal: true
FactoryBot.define do
2017-07-28 16:14:50 +08:00
factory :repository_column do
2019-03-07 16:05:35 +08:00
sequence(:name) { |n| "My column-#{n}" }
created_by { create :user }
repository
2017-07-28 16:14:50 +08:00
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
2017-07-28 16:14:50 +08:00
end
end