summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-13 12:39:11 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-13 12:39:11 +0100
commit161d15541a65ba167830f9a9bf5d181d0c5f4d77 (patch)
treed1dc93fd8fedb71219e54d0da1d70f68e1ca9f0d /spec/models/user_spec.rb
parent529188e4788991961796b1b6131389072ee61efb (diff)
downloadgitlab-ce-161d15541a65ba167830f9a9bf5d181d0c5f4d77.tar.gz
Prevent autogenerated OAuth username to clash with existing namespace.
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 6102b2e30be..c015a1d2687 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -303,8 +303,8 @@ describe User do
describe ".clean_username" do
- let!(:user1) { create(:user, username: "johngitlab-etc") }
- let!(:user2) { create(:user, username: "JohnGitLab-etc1") }
+ let!(:user) { create(:user, username: "johngitlab-etc") }
+ let!(:namespace) { create(:namespace, path: "JohnGitLab-etc1") }
it "cleans a username and makes sure it's available" do
expect(User.clean_username("-john+gitlab-ETC%.git@gmail.com")).to eq("johngitlab-ETC2")