Welcome to mirror list, hosted at ThFree Co, Russian Federation.

server_middleware_spec.rb « sidekiq_status « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 80728197b8cf313fe960f880ca69f498a7499f12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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