Commit d7e3fadb authored by Rémy Coutable's avatar Rémy Coutable

Ensure we generate unique usernames otherwise validations fail

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent fa65b65b
...@@ -4,10 +4,10 @@ module Db ...@@ -4,10 +4,10 @@ module Db
class AbuseReport class AbuseReport
def self.seed def self.seed
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
(::AbuseReport.default_per_page + 3).times do (::AbuseReport.default_per_page + 3).times do |i|
reported_user = reported_user =
::User.create!( ::User.create!(
username: "#{FFaker::Internet.user_name}-reported", username: "reported_user_#{i}",
name: FFaker::Name.name, name: FFaker::Name.name,
email: FFaker::Internet.email, email: FFaker::Internet.email,
confirmed_at: DateTime.now, confirmed_at: DateTime.now,
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
describe API::V3::Members, api: true do describe API::V3::Members, api: true do
include ApiHelpers include ApiHelpers
let(:master) { create(:user) } let(:master) { create(:user, username: 'master_user') }
let(:developer) { create(:user) } let(:developer) { create(:user) }
let(:access_requester) { create(:user) } let(:access_requester) { create(:user) }
let(:stranger) { create(:user) } let(:stranger) { create(:user) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment