Patch #23328 » create_test_members.rb
1 |
projects = Project.where(id: [1]) |
---|---|
2 |
prefix = 'testuser' |
3 |
|
4 |
5000.times do |i| |
5 |
login = sprintf("#{prefix}%05d", i) |
6 |
user = User.create!(:mail => "#{login}@example.com", :login => login, :firstname => login, :lastname => login) |
7 |
projects.each do |p| |
8 |
Member.create!(:principal => user, :project => p, :role_ids => [1]) |
9 |
end
|
10 |
end
|