diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-24 21:12:22 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-03 19:54:48 +0300 |
commit | 58fe40fbd38dce5d42f5f36681780579fb3f031b (patch) | |
tree | 8c902c1a5f79c3479ad17a1e02c8c2b731cb10d0 /db/fixtures/development | |
parent | 169dc4cec1f45cdcc548e3e682e4fd6f4c98926a (diff) |
Don't use FFaker in factories, use sequences instead
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 | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/db/fixtures/development/18_abuse_reports.rb b/db/fixtures/development/18_abuse_reports.rb index 7e67262b59e..762fab5f0ab 100644 --- a/db/fixtures/development/18_abuse_reports.rb +++ b/db/fixtures/development/18_abuse_reports.rb @@ -1,20 +1,22 @@ 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' - ) + module Development + class AbuseReport + 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.create(reporter: User.take, user: reported_user, message: 'User sends spam') - print '.' + ::AbuseReport.create(reporter: ::User.take, user: reported_user, message: 'User sends spam') + print '.' + end end end end @@ -22,4 +24,4 @@ module Db end end -Db::Fixtures::Development.seed +Db::Fixtures::Development::AbuseReport.seed |