BigW Consortium Gitlab

06_teams.rb 546 Bytes
Newer Older
1
require './spec/support/sidekiq'
2 3 4 5 6 7 8 9 10 11

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
12 13
      end
    end
14

15 16 17 18 19 20 21
    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
22
      end
23
    end
24 25
  end
end