summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-23 17:23:51 +0100
committerRémy Coutable <remy@rymai.me>2017-04-03 18:54:48 +0200
commit5f7cb26394921535a6e1e15f3baee7666c3ef654 (patch)
tree5d9cf0a0a7dafa4444c5e774c2bf4c73ab45a31d /db/fixtures
parent4e3516788fdea3de3c5f06e1981ddc518b05d0fb (diff)
downloadgitlab-ce-5f7cb26394921535a6e1e15f3baee7666c3ef654.tar.gz
Fix the AbuseReport seeder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/18_abuse_reports.rb26
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