client_middleware_spec.rb 366 Bytes
Newer Older
1 2 3 4 5
require 'spec_helper'

describe Gitlab::SidekiqStatus::ClientMiddleware do
  describe '#call' do
    it 'tracks the job in Redis' do
6
      expect(Gitlab::SidekiqStatus).to receive(:set).with('123', Gitlab::SidekiqStatus::DEFAULT_EXPIRATION)
7 8 9 10 11 12

      described_class.new.
        call('Foo', { 'jid' => '123' }, double(:queue), double(:pool)) { nil }
    end
  end
end