diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 18:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 18:08:47 +0300 |
commit | f4ad4d190044bd14fe4caec25b1a219887bc752f (patch) | |
tree | c2c185f73ea65906018324034149f43e4d1a366c /spec/requests | |
parent | bcd11d993d80d46053a97ee3b0344ed4d2b4571b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/users_controller_spec.rb | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index c49dbb6a269..f96d7864782 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -598,15 +598,10 @@ RSpec.describe UsersController, feature_category: :user_management do expect(response).to have_gitlab_http_status(:ok) expect(response.body).not_to be_empty end - - it 'does not list projects aimed for deletion' do - expect(response).to have_gitlab_http_status(:ok) - expect(assigns(:contributed_projects)).to eq([project]) - end end %i(html json).each do |format| - context "format: #{format}" do + context "with format: #{format}" do let(:format) { format } context 'with public profile' do @@ -626,6 +621,13 @@ RSpec.describe UsersController, feature_category: :user_management do let(:user) { create(:admin) } it_behaves_like 'renders contributed projects' + + if format == :json + it 'does not list projects aimed for deletion' do + expect(response).to have_gitlab_http_status(:ok) + expect(response.body).not_to include aimed_for_deletion_project.name + end + end end end end @@ -652,15 +654,10 @@ RSpec.describe UsersController, feature_category: :user_management do expect(response).to have_gitlab_http_status(:ok) expect(response.body).not_to be_empty end - - it 'does not list projects aimed for deletion' do - expect(response).to have_gitlab_http_status(:ok) - expect(assigns(:starred_projects)).to eq([project]) - end end %i(html json).each do |format| - context "format: #{format}" do + context "with format: #{format}" do let(:format) { format } context 'with public profile' do @@ -680,6 +677,13 @@ RSpec.describe UsersController, feature_category: :user_management do let(:user) { create(:admin) } it_behaves_like 'renders starred projects' + + if format == :json + it 'does not list projects aimed for deletion' do + expect(response).to have_gitlab_http_status(:ok) + expect(response.body).not_to include aimed_for_deletion_project.name + end + end end end end |