diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 09:08:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 09:08:46 +0000 |
commit | b806264d29b8d52ccb78a41dcc3d67f2b040700c (patch) | |
tree | af97e9d36b2c82520d6850836dee6ba8d7ed9b17 /spec/policies/user_policy_spec.rb | |
parent | 34ab9be97ecf84dd2b7a3b8f3149c0f7d1d7ab5c (diff) | |
download | gitlab-ce-b806264d29b8d52ccb78a41dcc3d67f2b040700c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/user_policy_spec.rb')
-rw-r--r-- | spec/policies/user_policy_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/policies/user_policy_spec.rb b/spec/policies/user_policy_spec.rb index 0af58e96c5e..9da9d2ce49b 100644 --- a/spec/policies/user_policy_spec.rb +++ b/spec/policies/user_policy_spec.rb @@ -48,36 +48,4 @@ describe UserPolicy do describe "updating a user" do it_behaves_like 'changing a user', :update_user end - - describe "updating a user's name" do - context 'when the ability to update their name is not disabled for users' do - before do - stub_application_setting(updating_name_disabled_for_users: false) - end - - it_behaves_like 'changing a user', :update_name - 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 'for a regular user' do - it { is_expected.not_to be_allowed(:update_name) } - end - - context 'for a ghost user' do - let(:current_user) { create(:user, :ghost) } - - it { is_expected.not_to be_allowed(:update_name) } - end - - context 'for an admin user' do - let(:current_user) { create(:admin) } - - it { is_expected.to be_allowed(:update_name) } - end - end - end end |