diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-27 00:10:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-27 00:10:31 +0300 |
commit | 277496b843d3c14cfd48286b1718b03775d83bbc (patch) | |
tree | 2ba3b900aa2103955dc28217d83acf9263ae08aa /spec/requests | |
parent | ea413f31cf00268c71bfab1351b92f75e72c9a80 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/acme_challenges_controller_spec.rb | 9 | ||||
-rw-r--r-- | spec/requests/application_controller_spec.rb | 15 | ||||
-rw-r--r-- | spec/requests/chaos_controller_spec.rb | 14 | ||||
-rw-r--r-- | spec/requests/health_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/metrics_controller_spec.rb | 9 | ||||
-rw-r--r-- | spec/requests/oauth/authorizations_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/registrations_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/requests/sessions_spec.rb | 4 |
8 files changed, 3 insertions, 62 deletions
diff --git a/spec/requests/acme_challenges_controller_spec.rb b/spec/requests/acme_challenges_controller_spec.rb deleted file mode 100644 index f37aefed488..00000000000 --- a/spec/requests/acme_challenges_controller_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe AcmeChallengesController, type: :request, feature_category: :pages do - it_behaves_like 'Base action controller' do - subject(:request) { get acme_challenge_path } - end -end diff --git a/spec/requests/application_controller_spec.rb b/spec/requests/application_controller_spec.rb deleted file mode 100644 index 52fdf6bc69e..00000000000 --- a/spec/requests/application_controller_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ApplicationController, type: :request, feature_category: :shared do - let_it_be(:user) { create(:user) } - - before do - sign_in(user) - end - - it_behaves_like 'Base action controller' do - subject(:request) { get root_path } - end -end diff --git a/spec/requests/chaos_controller_spec.rb b/spec/requests/chaos_controller_spec.rb deleted file mode 100644 index d2ce618b041..00000000000 --- a/spec/requests/chaos_controller_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ChaosController, type: :request, feature_category: :tooling do - it_behaves_like 'Base action controller' do - before do - # Stub leak_mem so we don't actually leak memory for the base action controller tests. - allow(Gitlab::Chaos).to receive(:leak_mem).with(100, 30.seconds) - end - - subject(:request) { get leakmem_chaos_path } - end -end diff --git a/spec/requests/health_controller_spec.rb b/spec/requests/health_controller_spec.rb index 3ad1d8a75b4..639f6194af9 100644 --- a/spec/requests/health_controller_spec.rb +++ b/spec/requests/health_controller_spec.rb @@ -73,9 +73,7 @@ RSpec.describe HealthController, feature_category: :database do end describe 'GET /-/readiness' do - subject(:request) { get readiness_path, params: params, headers: headers } - - it_behaves_like 'Base action controller' + subject { get '/-/readiness', params: params, headers: headers } shared_context 'endpoint responding with readiness data' do context 'when requesting instance-checks' do diff --git a/spec/requests/metrics_controller_spec.rb b/spec/requests/metrics_controller_spec.rb deleted file mode 100644 index ce96906e020..00000000000 --- a/spec/requests/metrics_controller_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe MetricsController, type: :request, feature_category: :metrics do - it_behaves_like 'Base action controller' do - subject(:request) { get metrics_path } - end -end diff --git a/spec/requests/oauth/authorizations_controller_spec.rb b/spec/requests/oauth/authorizations_controller_spec.rb index 7887bf52542..257f238d9ef 100644 --- a/spec/requests/oauth/authorizations_controller_spec.rb +++ b/spec/requests/oauth/authorizations_controller_spec.rb @@ -20,10 +20,6 @@ RSpec.describe Oauth::AuthorizationsController, feature_category: :system_access end describe 'GET #new' do - it_behaves_like 'Base action controller' do - subject(:request) { get oauth_authorization_path } - end - context 'when application redirect URI has a custom scheme' do context 'when CSP is disabled' do before do diff --git a/spec/requests/registrations_controller_spec.rb b/spec/requests/registrations_controller_spec.rb index 71f2f347f0d..8b857046a4d 100644 --- a/spec/requests/registrations_controller_spec.rb +++ b/spec/requests/registrations_controller_spec.rb @@ -6,9 +6,7 @@ RSpec.describe RegistrationsController, type: :request, feature_category: :syste describe 'POST #create' do let_it_be(:user_attrs) { build_stubbed(:user).slice(:first_name, :last_name, :username, :email, :password) } - subject(:request) { post user_registration_path, params: { user: user_attrs } } - - it_behaves_like 'Base action controller' + subject(:create_user) { post user_registration_path, params: { user: user_attrs } } context 'when email confirmation is required' do before do @@ -17,7 +15,7 @@ RSpec.describe RegistrationsController, type: :request, feature_category: :syste end it 'redirects to the `users_almost_there_path`', unless: Gitlab.ee? do - request + create_user expect(response).to redirect_to(users_almost_there_path(email: user_attrs[:email])) end diff --git a/spec/requests/sessions_spec.rb b/spec/requests/sessions_spec.rb index 1a925969c5a..3428e607305 100644 --- a/spec/requests/sessions_spec.rb +++ b/spec/requests/sessions_spec.rb @@ -7,10 +7,6 @@ RSpec.describe 'Sessions', feature_category: :system_access do let(:user) { create(:user) } - it_behaves_like 'Base action controller' do - subject(:request) { get new_user_session_path } - end - context 'for authentication', :allow_forgery_protection do it 'logout does not require a csrf token' do login_as(user) |