Sha256: 45023e7857a14649eba93cafa77df47b984c2b3f07479d9f9fd86fc3e5646c20

Contents?: true

Size: 603 Bytes

Versions: 15

Compression:

Stored size: 603 Bytes

Contents

require 'job_uniqueness/spec_helper'

RSpec.describe CanvasSync::JobUniqueness::Strategy::UntilExpired do
  include_context 'lock strategy specs', strategy: :until_expired

  # include_examples "a lock implementation"

  describe "#on_enqueue" do
    it "locks the queue" do
      process_one.on_enqueue {}
      expect(process_one).to be_locked
    end
  end

  describe "#on_perform" do
    it "does not unlock after processing" do
      process_one.on_enqueue {}
      process_one.on_perform {}
      process_one.batch_callback(:success, nil)
      expect(process_one).to be_locked
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
canvas_sync-0.22.6 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.5 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.4 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.3 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.2 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.1 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta8 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta7 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta6 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta5 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta4 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta3 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta2 spec/job_uniqueness/strategy/until_expired_spec.rb
canvas_sync-0.22.0.beta1 spec/job_uniqueness/strategy/until_expired_spec.rb