debian-mirror-gitlab/spec/lib/gitlab/sidekiq_status/server_middleware_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
407 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::SidekiqStatus::ServerMiddleware do
2017-08-17 22:00:37 +05:30
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