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