summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-08 17:35:49 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-08 17:35:49 -0700
commit27e3b47b7f9ba6daaef61677c6743e99c3c6dc60 (patch)
treef48eada7831479119e3639062b896772082f368c /db/fixtures
parent8b551ee31858db9c5da1ff5245359151d5b71211 (diff)
downloadgitlab-ce-27e3b47b7f9ba6daaef61677c6743e99c3c6dc60.tar.gz
Fix user fixtures for development
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/05_users.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/db/fixtures/development/05_users.rb b/db/fixtures/development/05_users.rb
index b697f58d4ef..24952a1f661 100644
--- a/db/fixtures/development/05_users.rb
+++ b/db/fixtures/development/05_users.rb
@@ -1,30 +1,31 @@
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