scinote-web/spec/factories/teams.rb
ajugo f278f490d9
Fix api tests [SCI-9569] (#6519)
* Fix api tests [SCI-9569]

* Fix inventory status api index [SCI-9569]
2023-10-24 13:36:03 +02:00

20 lines
518 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :team do
association :created_by, factory: :user
sequence(:name) { |n| "My team-#{n}" }
description { Faker::Lorem.sentence }
space_taken { 1048576 }
without_templates { true }
after(:create) do |team|
team.created_by.update(current_team_id: team.id)
end
trait :with_members do
users { create_list :user, 3 }
end
trait :shareable_links_enabled do
shareable_links_enabled { true }
end
end
end