diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/services/ci/unregister_runner_service_spec.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/services/ci/unregister_runner_service_spec.rb')
-rw-r--r-- | spec/services/ci/unregister_runner_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/ci/unregister_runner_service_spec.rb b/spec/services/ci/unregister_runner_service_spec.rb new file mode 100644 index 00000000000..f427e04f228 --- /dev/null +++ b/spec/services/ci/unregister_runner_service_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ::Ci::UnregisterRunnerService, '#execute' do + subject { described_class.new(runner).execute } + + let(:runner) { create(:ci_runner) } + + it 'destroys runner' do + expect(runner).to receive(:destroy).once.and_call_original + expect { subject }.to change { Ci::Runner.count }.by(-1) + expect(runner[:errors]).to be_nil + end +end |