BigW Consortium Gitlab

server_middleware_spec.rb 370 Bytes
Newer Older
1 2 3 4 5 6 7
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')

8 9
      ret = described_class.new
        .call(double(:worker), { 'jid' => '123' }, double(:queue)) { 10 }
10 11 12 13 14

      expect(ret).to eq(10)
    end
  end
end