Sha256: ad9d76d4c489a47e723bca38a65e9228b7a4f316009da4da5bb81f6796e23774

Contents?: true

Size: 479 Bytes

Versions: 9

Compression:

Stored size: 479 Bytes

Contents

require_relative 'helper'

class TestWatcher < Sidetiq::TestCase
  def setup
    Sidetiq.config.lock.watcher.remove_lock = true
    Sidetiq.config.lock.watcher.notify = true

    @worker = Sidetiq::Lock::Watcher.new
  end

  def test_perform
    Sidetiq::Lock::Redis.new("foobar", 1000000).lock

    assert_equal 1, Sidetiq::Lock::Redis.all.length

    @worker.expects(:handle_exception).once

    @worker.perform

    assert_equal 0, Sidetiq::Lock::Redis.all.length
  end
end


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sidetiq-0.5.0 test/test_watcher.rb
sidetiq-0.4.3 test/test_watcher.rb
sidetiq-0.4.2 test/test_watcher.rb
sidetiq-0.4.1 test/test_watcher.rb
sidetiq-0.4.0 test/test_watcher.rb
sidetiq-0.4.0.rc4 test/test_watcher.rb
sidetiq-0.4.0.rc3 test/test_watcher.rb
sidetiq-0.4.0.rc2 test/test_watcher.rb
sidetiq-0.4.0.rc1 test/test_watcher.rb