2017-01-20 08:57:01 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-02-06 13:49:37 -05:00
|
|
|
describe Ci::UpdateRunnerService, :services do
|
2017-01-20 08:57:01 -05:00
|
|
|
let(:runner) { create(:ci_runner) }
|
|
|
|
|
|
|
|
describe '#update' do
|
|
|
|
before do
|
|
|
|
allow(runner).to receive(:tick_runner_queue)
|
|
|
|
|
|
|
|
described_class.new(runner).update(description: 'new runner')
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'updates the runner and ticking the queue' do
|
|
|
|
expect(runner.description).to eq('new runner')
|
|
|
|
expect(runner).to have_received(:tick_runner_queue)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|