gitlab-org--gitlab-foss/spec/lib/gitlab/sidekiq_status/server_middleware_spec.rb
2017-06-21 13:48:12 +00:00

14 lines
370 B
Ruby

require 'spec_helper'
describe Gitlab::SidekiqStatus::ServerMiddleware do
describe '#call' do
it 'stops tracking of a job upon completion' do
expect(Gitlab::SidekiqStatus).to receive(:unset).with('123')
ret = described_class.new
.call(double(:worker), { 'jid' => '123' }, double(:queue)) { 10 }
expect(ret).to eq(10)
end
end
end