scinote-web/spec/factories/repository_rows.rb

23 lines
467 B
Ruby
Raw Normal View History

# frozen_string_literal: true
FactoryBot.define do
2017-07-28 16:14:50 +08:00
factory :repository_row do
sequence(:name) { |n| "My row-#{n}" }
created_by { create :user }
repository
last_modified_by { created_by }
2020-06-10 00:50:36 +08:00
trait :archived do
archived { true }
archived_on { Time.zone.now }
archived_by { created_by }
end
2020-06-23 14:24:52 +08:00
trait :restored do
archived { false }
restored_on { Time.zone.now }
restored_by { created_by }
end
2017-07-28 16:14:50 +08:00
end
end