scinote-web/spec/factories/repositories.rb

16 lines
327 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
2019-03-07 02:27:40 +08:00
end
end