Welcome to mirror list, hosted at ThFree Co, Russian Federation.

unregister_runner_service_spec.rb « ci « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f427e04f2282e4ff4315107e89874c7522288337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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