2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GitlabShellWorker do
|
|
|
|
let(:worker) { described_class.new }
|
|
|
|
|
|
|
|
describe '#perform with add_key' do
|
|
|
|
it 'calls add_key on Gitlab::Shell' do
|
2020-03-13 15:44:24 +05:30
|
|
|
expect_next_instance_of(Gitlab::Shell) do |instance|
|
|
|
|
expect(instance).to receive(:add_key).with('foo', 'bar')
|
|
|
|
end
|
2018-03-17 18:26:18 +05:30
|
|
|
worker.perform(:add_key, 'foo', 'bar')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|