From 5f7cb26394921535a6e1e15f3baee7666c3ef654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 23 Mar 2017 17:23:51 +0100 Subject: Fix the AbuseReport seeder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- db/fixtures/development/18_abuse_reports.rb | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'db/fixtures') 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 -- cgit v1.2.1