2019-12-04 20:38:33 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
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')
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
ret = described_class.new
|
|
|
|
.call(double(:worker), { 'jid' => '123' }, double(:queue)) { 10 }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
expect(ret).to eq(10)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|