spec/lib/appsignal/hooks/delayed_job_spec.rb in appsignal-0.12.rc.9 vs spec/lib/appsignal/hooks/delayed_job_spec.rb in appsignal-0.12.rc.10

- old
+ new

@@ -34,11 +34,11 @@ :name => 'TestClass#perform', :priority => 1, :attempts => 1, :queue => 'default', :created_at => time - 60_000, - :payload_object => double + :payload_object => double(:args => ['argument']), ) end let(:invoked_block) { Proc.new { } } let(:error) { StandardError.new } @@ -52,10 +52,11 @@ :priority => 1, :attempts => 1, :queue => 'default', :id => 123 }, + :params => ['argument'], :queue_start => time - 60_000, ) Timecop.freeze(time) do plugin.invoke_with_instrumentation(job, invoked_block) @@ -64,18 +65,19 @@ context "with custom name call" do let(:job) do double( :payload_object => double( - :appsignal_name => 'CustomClass#perform' + :appsignal_name => 'CustomClass#perform', + :args => ['argument'] ), - :id => 123, - :name => 'TestClass#perform', - :priority => 1, - :attempts => 1, - :queue => 'default', - :created_at => time - 60_000 + :id => 123, + :name => 'TestClass#perform', + :priority => 1, + :attempts => 1, + :queue => 'default', + :created_at => time - 60_000 ) end it "should wrap in a transaction with the correct params" do Appsignal.should_receive(:monitor_transaction).with( 'perform_job.delayed_job', @@ -85,9 +87,10 @@ :priority => 1, :attempts => 1, :queue => 'default', :id => 123 }, + :params => ['argument'], :queue_start => time - 60_000 ) Timecop.freeze(time) do plugin.invoke_with_instrumentation(job, invoked_block)