diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-23 19:23:51 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-03 19:54:48 +0300 |
commit | 5f7cb26394921535a6e1e15f3baee7666c3ef654 (patch) | |
tree | 5d9cf0a0a7dafa4444c5e774c2bf4c73ab45a31d /db/fixtures/development | |
parent | 4e3516788fdea3de3c5f06e1981ddc518b05d0fb (diff) |
Fix the AbuseReport seeder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db/fixtures/development')
-rw-r--r-- | db/fixtures/development/18_abuse_reports.rb | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/db/fixtures/development/18_abuse_reports.rb b/db/fixtures/development/18_abuse_reports.rb index 8618d10387a..7e67262b59e 100644 --- a/db/fixtures/development/18_abuse_reports.rb +++ b/db/fixtures/development/18_abuse_reports.rb @@ -1,5 +1,25 @@ -require 'factory_girl_rails' +module Db + module Fixtures + class Development + def self.seed + Gitlab::Seeder.quiet do + (AbuseReport.default_per_page + 3).times do + reported_user = + User.create!( + username: FFaker::Internet.user_name, + name: FFaker::Name.name, + email: FFaker::Internet.email, + confirmed_at: DateTime.now, + password: '12345678' + ) -(AbuseReport.default_per_page + 3).times do - FactoryGirl.create(:abuse_report) + AbuseReport.create(reporter: User.take, user: reported_user, message: 'User sends spam') + print '.' + end + end + end + end + end end + +Db::Fixtures::Development.seed |