Ensure we generate unique usernames otherwise validations fail
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
fa65b65b0f
commit
d7e3fadb42
2 changed files with 3 additions and 3 deletions
|
@ -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'
|
||||||
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) }
|
||||||
|
|
Loading…
Reference in a new issue