Add users with predictable username and password
to development seed.
This commit is contained in:
parent
174c00cf2c
commit
57fddea8bb
1 changed files with 16 additions and 0 deletions
|
@ -13,4 +13,20 @@ Gitlab::Seeder.quiet do
|
|||
print 'F'
|
||||
end
|
||||
end
|
||||
|
||||
(1..5).each do |i|
|
||||
begin
|
||||
User.seed(:id, [
|
||||
id: i + 10,
|
||||
username: "user#{i}",
|
||||
name: "User #{i}",
|
||||
email: "user#{i}@example.com",
|
||||
confirmed_at: DateTime.now,
|
||||
password: '12345678'
|
||||
])
|
||||
print '.'
|
||||
rescue ActiveRecord::RecordNotSaved
|
||||
print 'F'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue