diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/controllers/admin | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r-- | spec/controllers/admin/integrations_controller_spec.rb | 8 | ||||
-rw-r--r-- | spec/controllers/admin/runners_controller_spec.rb | 28 | ||||
-rw-r--r-- | spec/controllers/admin/users_controller_spec.rb | 4 |
3 files changed, 10 insertions, 30 deletions
diff --git a/spec/controllers/admin/integrations_controller_spec.rb b/spec/controllers/admin/integrations_controller_spec.rb index 64ae2a95b4e..1793b3a86d1 100644 --- a/spec/controllers/admin/integrations_controller_spec.rb +++ b/spec/controllers/admin/integrations_controller_spec.rb @@ -9,6 +9,14 @@ RSpec.describe Admin::IntegrationsController do sign_in(admin) end + it_behaves_like IntegrationsActions do + let(:integration_attributes) { { instance: true, project: nil } } + + let(:routing_params) do + { id: integration.to_param } + end + end + describe '#edit' do Integration.available_integration_names.each do |integration_name| context "#{integration_name}" do diff --git a/spec/controllers/admin/runners_controller_spec.rb b/spec/controllers/admin/runners_controller_spec.rb index 8e57b4f03a7..996964fdcf0 100644 --- a/spec/controllers/admin/runners_controller_spec.rb +++ b/spec/controllers/admin/runners_controller_spec.rb @@ -23,10 +23,6 @@ RSpec.describe Admin::RunnersController do describe '#show' do render_views - before do - stub_feature_flags(runner_detailed_view_vue_ui: false) - end - let_it_be(:project) { create(:project) } let_it_be(:project_two) { create(:project) } @@ -61,30 +57,6 @@ RSpec.describe Admin::RunnersController do expect(response).to have_gitlab_http_status(:ok) end - - describe 'Cost factors values' do - context 'when it is Gitlab.com' do - before do - expect(Gitlab).to receive(:com?).at_least(:once) { true } - end - - it 'renders cost factors fields' do - get :show, params: { id: runner.id } - - expect(response.body).to match /Private projects Minutes cost factor/ - expect(response.body).to match /Public projects Minutes cost factor/ - end - end - - context 'when it is not Gitlab.com' do - it 'does not show cost factor fields' do - get :show, params: { id: runner.id } - - expect(response.body).not_to match /Private projects Minutes cost factor/ - expect(response.body).not_to match /Public projects Minutes cost factor/ - end - end - end end describe '#update' do diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 6e172f53257..015c36c9335 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -146,7 +146,7 @@ RSpec.describe Admin::UsersController do it 'sends the user a rejection email' do expect_next_instance_of(NotificationService) do |notification| - allow(notification).to receive(:user_admin_rejection).with(user.name, user.notification_email) + allow(notification).to receive(:user_admin_rejection).with(user.name, user.notification_email_or_default) end subject @@ -165,7 +165,7 @@ RSpec.describe Admin::UsersController do it 'displays the error' do subject - expect(flash[:alert]).to eq('This user does not have a pending request') + expect(flash[:alert]).to eq('User does not have a pending request') end it 'does not email the user' do |