diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-03 18:25:50 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-02-24 16:50:19 +0530 |
commit | ca16c3734b7b89f71bdc9e1c18152aa1599c4f89 (patch) | |
tree | c00010e64f210675c3a6c777f080aae51455934b /spec | |
parent | ff19bbd3b40621ae94632b9aa68fd12645b6ed41 (diff) | |
download | gitlab-ce-ca16c3734b7b89f71bdc9e1c18152aa1599c4f89.tar.gz |
Extract code from `Namespace#clean_path` for ghost user generation.
1. Create a `Uniquify` class, which generalizes the process of generating unique
strings, by accepting a function that defines what "uniqueness" means in a
given context.
2. WIP: Make sure tests for `Namespace` pass, add more if necessary.
3. WIP: Add tests for `Uniquify`
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 00e7927bf90..861d338ef95 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1513,7 +1513,7 @@ describe User, models: true do ghost = User.ghost expect(ghost).to be_persisted - expect(ghost.username).to eq('ghost0') + expect(ghost.username).to eq('ghost1') end end @@ -1523,7 +1523,7 @@ describe User, models: true do ghost = User.ghost expect(ghost).to be_persisted - expect(ghost.email).to eq('ghost0@example.com') + expect(ghost.email).to eq('ghost1@example.com') end end end |