diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /spec/controllers/admin/runners_controller_spec.rb | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'spec/controllers/admin/runners_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin/runners_controller_spec.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/controllers/admin/runners_controller_spec.rb b/spec/controllers/admin/runners_controller_spec.rb index 6fa8d2c61c1..5f98004e9cf 100644 --- a/spec/controllers/admin/runners_controller_spec.rb +++ b/spec/controllers/admin/runners_controller_spec.rb @@ -106,13 +106,11 @@ RSpec.describe Admin::RunnersController, feature_category: :runner_fleet do subject(:request) { post :update, params: runner_params } context 'with update succeeding' do - before do + it 'updates the runner and ticks the queue' do expect_next_instance_of(Ci::Runners::UpdateRunnerService, runner) do |service| expect(service).to receive(:execute).with(anything).and_call_original end - end - it 'updates the runner and ticks the queue' do expect { request }.to change { runner.ensure_runner_queue_value } runner.reload @@ -123,13 +121,11 @@ RSpec.describe Admin::RunnersController, feature_category: :runner_fleet do end context 'with update failing' do - before do + it 'does not update runner or tick the queue' do expect_next_instance_of(Ci::Runners::UpdateRunnerService, runner) do |service| expect(service).to receive(:execute).with(anything).and_return(ServiceResponse.error(message: 'failure')) end - end - it 'does not update runner or tick the queue' do expect { request }.not_to change { runner.ensure_runner_queue_value } expect { request }.not_to change { runner.reload.description } |