diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 12:08:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 12:08:46 +0300 |
commit | b806264d29b8d52ccb78a41dcc3d67f2b040700c (patch) | |
tree | af97e9d36b2c82520d6850836dee6ba8d7ed9b17 /spec/controllers/profiles_controller_spec.rb | |
parent | 34ab9be97ecf84dd2b7a3b8f3149c0f7d1d7ab5c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/profiles_controller_spec.rb')
-rw-r--r-- | spec/controllers/profiles_controller_spec.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb index 85b3ba286a1..265f941e146 100644 --- a/spec/controllers/profiles_controller_spec.rb +++ b/spec/controllers/profiles_controller_spec.rb @@ -81,54 +81,6 @@ describe ProfilesController, :request_store do expect(ldap_user.location).to eq('City, Country') end - context 'updating name' do - subject { put :update, params: { user: { name: 'New Name' } } } - - context 'when the ability to update thier name is not disabled for users' do - before do - stub_application_setting(updating_name_disabled_for_users: false) - sign_in(user) - end - - it 'updates the name' do - subject - - expect(response.status).to eq(302) - expect(user.reload.name).to eq('New Name') - end - end - - context 'when the ability to update their name is disabled for users' do - before do - stub_application_setting(updating_name_disabled_for_users: true) - end - - context 'as a regular user' do - it 'does not update the name' do - sign_in(user) - - subject - - expect(response.status).to eq(302) - expect(user.reload.name).not_to eq('New Name') - end - end - - context 'as an admin user' do - it 'updates the name' do - admin = create(:admin) - - sign_in(admin) - - subject - - expect(response.status).to eq(302) - expect(admin.reload.name).to eq('New Name') - end - end - end - end - it 'allows setting a user status' do sign_in(user) |