mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
22 lines
467 B
Ruby
22 lines
467 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :repository_row do
|
|
sequence(:name) { |n| "My row-#{n}" }
|
|
created_by { create :user }
|
|
repository
|
|
last_modified_by { created_by }
|
|
|
|
trait :archived do
|
|
archived { true }
|
|
archived_on { Time.zone.now }
|
|
archived_by { created_by }
|
|
end
|
|
|
|
trait :restored do
|
|
archived { false }
|
|
restored_on { Time.zone.now }
|
|
restored_by { created_by }
|
|
end
|
|
end
|
|
end
|