summaryrefslogtreecommitdiff
path: root/db/fixtures/development/06_teams.rb
blob: 86e0a38aae17b65e7136133dd39984dff297f006 (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.team << [user, Gitlab::Access.values.sample]
          print '.'
        else
          print 'F'
        end
      end
    end
  end
end