gitlab-org--gitlab-foss/db/fixtures/development/06_teams.rb
Dmitriy Zaporozhets e4bc359841
Fix dev fixtures
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-18 20:19:11 +03:00

21 lines
435 B
Ruby

Gitlab::Seeder.quiet do
Group.all.each do |group|
User.all.sample(4).each do |user|
if group.add_users([user.id], Gitlab::Access.values.sample)
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