Skip to content

Commit

Permalink
Fix: use sidekiq's to_f math before conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
wspurgin committed Aug 1, 2023
1 parent 470a922 commit d778c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/sidekiq/matchers/be_delayed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def matches?(expected_method)
find_job @expected_method, @expected_arguments do |job|
if @expected_interval
created_enqueued_at = job['enqueued_at'] || job['created_at']
return job['at'].to_i == created_enqueued_at.to_i + @expected_interval
return job['at'].to_i == Time.at(created_enqueued_at.to_f + @expected_interval.to_f).to_i
elsif @expected_time
return job['at'].to_i == @expected_time.to_i
else
Expand Down

0 comments on commit d778c6a

Please sign in to comment.