debian-mirror-gitlab/db/fixtures/development/06_teams.rb

26 lines
546 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require './spec/support/sidekiq'
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do
Group.all.each do |group|
User.all.sample(4).each do |user|
if group.add_user(user, Gitlab::Access.values.sample).persisted?
print '.'
else
print 'F'
end
2014-09-02 18:07:02 +05:30
end
end
2017-08-17 22:00:37 +05:30
Project.all.each do |project|
User.all.sample(4).each do |user|
if project.team << [user, Gitlab::Access.values.sample]
print '.'
else
print 'F'
end
2014-09-02 18:07:02 +05:30
end
end
end
end