Fix the AbuseReport seeder
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
4e3516788f
commit
5f7cb26394
1 changed files with 23 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue