spec/sidekiq/middleware/server/datadog_spec.rb in sidekiq-datadog-0.5.1 vs spec/sidekiq/middleware/server/datadog_spec.rb in sidekiq-datadog-0.5.2

- old
+ new

@@ -91,6 +91,18 @@ 'sidekiq.job.time:333|ms|#queue:default,status:ok', "sidekiq.job.queued_time:#{expected_queued_time_ms}|ms|#queue:default,status:ok", ]) end end + + context 'when sidekiq/api is required' do + before do + require 'sidekiq/api' + end + + it 'should not raise any errors' do + expect do + subject.call(worker, { 'enqueued_at' => enqueued_at }, 'default') { 'ok' } + end.not_to raise_error + end + end end