spec/sidekiq/debounce_spec.rb in sidekiq-debounce-1.0.2 vs spec/sidekiq/debounce_spec.rb in sidekiq-debounce-1.1.0

- old
+ new

@@ -1,8 +1,8 @@ require 'spec_helper' -require 'sidekiq/api' -require 'sidekiq/debounce/middleware' +require 'sidekiq/debounce' +require 'sidekiq' class DebouncedWorker include Sidekiq::Worker sidekiq_options debounce: true @@ -18,10 +18,10 @@ after do Sidekiq.redis(&:flushdb) end let(:set) { Sidekiq::ScheduledSet.new } - let(:sorted_entry) { Sidekiq::SortedEntry.new(set, 0, 'jid' => '54321') } + let(:sorted_entry) { Sidekiq::SortedEntry.new(set, 0, {jid: '54321'}.to_json) } it 'queues a job normally at first' do DebouncedWorker.perform_in(60, 'foo', 'bar') set.size.must_equal 1, 'set.size must be 1' end