summaryrefslogtreecommitdiff
path: root/db/fixtures/development/06_teams.rb
blob: b218f4e71fd9048cdcce231fa0e66a1b06b6f612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
      end
    end

    Project.all.each do |project|
      User.all.sample(4).each do |user|
        if project.add_role(user, Gitlab::Access.sym_options.keys.sample)
          print '.'
        else
          print 'F'
        end
      end
    end
  end
end