Commit 6187670f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-dev-fixture' into 'master'

Fix user fixtures for development

See merge request !1657
parents 8b551ee3 27e3b47b
Gitlab::Seeder.quiet do
(2..20).each do |i|
begin
User.seed(:id, [{
id: i,
User.create!(
username: Faker::Internet.user_name,
name: Faker::Name.name,
email: Faker::Internet.email,
confirmed_at: DateTime.now
}])
confirmed_at: DateTime.now,
password: '12345678'
)
print '.'
rescue ActiveRecord::RecordNotSaved
rescue ActiveRecord::RecordInvalid
print 'F'
end
end
(1..5).each do |i|
begin
User.seed do |s|
s.username = "user#{i}"
s.name = "User #{i}"
s.email = "user#{i}@example.com"
s.confirmed_at = DateTime.now
s.password = '12345678'
end
User.create!(
username: "user#{i}",
name: "User #{i}",
email: "user#{i}@example.com",
confirmed_at: DateTime.now,
password: '12345678'
)
print '.'
rescue ActiveRecord::RecordNotSaved
rescue ActiveRecord::RecordInvalid
print 'F'
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment