2017-08-17 22:00:37 +05:30
|
|
|
module Db
|
|
|
|
module Fixtures
|
|
|
|
module Development
|
|
|
|
class AbuseReport
|
|
|
|
def self.seed
|
|
|
|
Gitlab::Seeder.quiet do
|
|
|
|
(::AbuseReport.default_per_page + 3).times do |i|
|
|
|
|
reported_user =
|
|
|
|
::User.create!(
|
|
|
|
username: "reported_user_#{i}",
|
|
|
|
name: FFaker::Name.name,
|
|
|
|
email: FFaker::Internet.email,
|
|
|
|
confirmed_at: DateTime.now,
|
2022-08-27 11:52:29 +05:30
|
|
|
password: ::User.random_password
|
2017-08-17 22:00:37 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
::AbuseReport.create(reporter: ::User.take, user: reported_user, message: 'User sends spam')
|
|
|
|
print '.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Db::Fixtures::Development::AbuseReport.seed
|