debian-mirror-gitlab/db/fixtures/development/18_abuse_reports.rb
2022-08-27 11:52:29 +05:30

27 lines
759 B
Ruby

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,
password: ::User.random_password
)
::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