scinote-web/spec/factories/repositories.rb

21 lines
451 B
Ruby
Raw Normal View History

2019-03-07 02:27:40 +08:00
# frozen_string_literal: true
FactoryBot.define do
factory :repository do
2019-03-07 16:05:35 +08:00
sequence(:name) { |n| "My repository-#{n}" }
2019-03-07 02:27:40 +08:00
created_by { create :user }
team
trait :write_shared do
permission_level { :shared_write }
end
trait :read_shared do
permission_level { :shared_read }
end
trait :archived do
archived { true }
archived_on { Time.zone.now }
archived_by { created_by }
end
2019-03-07 02:27:40 +08:00
end
end