BigW Consortium Gitlab

05_users.rb 655 Bytes
Newer Older
1
Gitlab::Seeder.quiet do
2
  20.times do |i|
3
    begin
4
      User.create!(
Robert Speicher committed
5 6 7
        username: FFaker::Internet.user_name,
        name: FFaker::Name.name,
        email: FFaker::Internet.email,
8 9 10 11
        confirmed_at: DateTime.now,
        password: '12345678'
      )

12
      print '.'
13
    rescue ActiveRecord::RecordInvalid
14 15 16
      print 'F'
    end
  end
17

18
  5.times do |i|
19
    begin
20 21 22 23 24 25 26
      User.create!(
        username: "user#{i}",
        name: "User #{i}",
        email: "user#{i}@example.com",
        confirmed_at: DateTime.now,
        password: '12345678'
      )
27
      print '.'
28
    rescue ActiveRecord::RecordInvalid
29 30 31
      print 'F'
    end
  end
32
end