summaryrefslogtreecommitdiff
path: root/spec/migrations/rename_users_with_renamed_namespace_spec.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-05-19 17:22:45 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-05-19 17:27:18 +0200
commit51913c32bab12ec366cc3c529f2ed3d6699ee25e (patch)
tree602cf56e5941624487f8ef0f8c1129adcea6ba4c /spec/migrations/rename_users_with_renamed_namespace_spec.rb
parent84f8cd1718857b4ee75fa6bd4b2fdb4879846bcf (diff)
downloadgitlab-ce-51913c32bab12ec366cc3c529f2ed3d6699ee25e.tar.gz
Simpler way of renaming users
Diffstat (limited to 'spec/migrations/rename_users_with_renamed_namespace_spec.rb')
-rw-r--r--spec/migrations/rename_users_with_renamed_namespace_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/migrations/rename_users_with_renamed_namespace_spec.rb b/spec/migrations/rename_users_with_renamed_namespace_spec.rb
index aefa539094f..1e9aab3d9a1 100644
--- a/spec/migrations/rename_users_with_renamed_namespace_spec.rb
+++ b/spec/migrations/rename_users_with_renamed_namespace_spec.rb
@@ -2,8 +2,9 @@ require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170518200835_rename_users_with_renamed_namespace.rb')
describe RenameUsersWithRenamedNamespace, truncate: true do
- it 'renames a user that had his namespace renamed to the namespace path' do
+ it 'renames a user that had their namespace renamed to the namespace path' do
other_user = create(:user, username: 'kodingu')
+ other_user1 = create(:user, username: 'api0')
user = create(:user, username: "Users0")
user.update_attribute(:username, 'Users')
@@ -14,6 +15,8 @@ describe RenameUsersWithRenamedNamespace, truncate: true do
expect(user.reload.username).to eq('Users0')
expect(user1.reload.username).to eq('import0')
+
expect(other_user.reload.username).to eq('kodingu')
+ expect(other_user1.reload.username).to eq('api0')
end
end