Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
resque-lock / test / locksmith_test.rb
Size: Mime:
require 'test/unit'
require 'resque'
require 'resque/plugins/lock'
require 'resque/failure/locksmith'


class LocksmithTest < Test::Unit::TestCase

  class Job
    extend Resque::Plugins::Lock
  end

  def test_should_delete_lock
    lock = Job.lock('whatever')
    Job.before_enqueue_lock('whatever')

    payload = {'class' => Job, 'args' => 'whatever'}
    smith = Resque::Failure::Locksmith.new(nil, nil, nil, payload)
    smith.save

    assert_nil Resque.redis.get(lock)
  end

end