Sha256: db04674d9c4f7c0d3432133bef4866e5d9fb3b900451948e09dfbb15b0c3f4d7
Contents?: true
Size: 600 Bytes
Versions: 2
Compression:
Stored size: 600 Bytes
Contents
require "test_helper" require "sidekiq/lock/testing/inline" describe "inline test helper" do after { set_lock_variable! } it "has helper fuction for setting lock" do Sidekiq::Lock::RedisLock.expects(:new).with({ timeout: 1, name: 'lock-worker' }, 'worker argument').returns('lock set') set_sidekiq_lock(LockWorker, 'worker argument') assert_equal 'lock set', lock_thread_variable end it "has helper fuction for clearing lock" do set_lock_variable! "test" assert_equal "test", lock_thread_variable clear_sidekiq_lock assert_nil lock_thread_variable end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sidekiq-lock-0.3.0 | test/lib/testing/inline_test.rb |
sidekiq-lock-0.2.0 | test/lib/testing/inline_test.rb |