Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-25 18:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-25 18:09:00 +0300
commit10cc2d7a724da4c74b9be7efdbd013c1744047ee (patch)
tree796f228f98bc29ab2cd03f1fbcc6e42adb67d93c /spec/requests
parent6bc190088ee629fca757b135d25e74cc09c9cb9d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/users_spec.rb8
-rw-r--r--spec/requests/users_controller_spec.rb8
2 files changed, 12 insertions, 4 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 94fba451860..66d6c29cd4d 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -2565,7 +2565,7 @@ RSpec.describe API::Users do
it 'does not approve a deactivated user' do
expect { approve }.not_to change { deactivated_user.reload.state }
expect(response).to have_gitlab_http_status(:conflict)
- expect(json_response['message']).to eq('The user you are trying to approve is not pending an approval')
+ expect(json_response['message']).to eq('The user you are trying to approve is not pending approval')
end
end
@@ -2585,7 +2585,7 @@ RSpec.describe API::Users do
it 'returns 201' do
expect { approve }.not_to change { user.reload.state }
expect(response).to have_gitlab_http_status(:conflict)
- expect(json_response['message']).to eq('The user you are trying to approve is not pending an approval')
+ expect(json_response['message']).to eq('The user you are trying to approve is not pending approval')
end
end
@@ -2595,7 +2595,7 @@ RSpec.describe API::Users do
it 'returns 403' do
expect { approve }.not_to change { blocked_user.reload.state }
expect(response).to have_gitlab_http_status(:conflict)
- expect(json_response['message']).to eq('The user you are trying to approve is not pending an approval')
+ expect(json_response['message']).to eq('The user you are trying to approve is not pending approval')
end
end
@@ -2605,7 +2605,7 @@ RSpec.describe API::Users do
it 'returns 403' do
expect { approve }.not_to change { ldap_blocked_user.reload.state }
expect(response).to have_gitlab_http_status(:conflict)
- expect(json_response['message']).to eq('The user you are trying to approve is not pending an approval')
+ expect(json_response['message']).to eq('The user you are trying to approve is not pending approval')
end
end
diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb
index b224ef87229..f3ddcbef1c2 100644
--- a/spec/requests/users_controller_spec.rb
+++ b/spec/requests/users_controller_spec.rb
@@ -268,6 +268,14 @@ RSpec.describe UsersController do
end
it_behaves_like 'renders all public keys'
+
+ context 'when public visibility is restricted' do
+ before do
+ stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC])
+ end
+
+ it_behaves_like 'renders all public keys'
+ end
end
end
end