From 548b0d8161473f12d66663b2657810410a4d3405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Wed, 1 Apr 2015 04:00:49 +0200 Subject: Rescue correct constant in Workers::ReceiveLocalBatch Fixes #5834 --- spec/workers/receive_local_batch_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spec/workers/receive_local_batch_spec.rb (limited to 'spec/workers') diff --git a/spec/workers/receive_local_batch_spec.rb b/spec/workers/receive_local_batch_spec.rb new file mode 100644 index 000000000..acd841cf3 --- /dev/null +++ b/spec/workers/receive_local_batch_spec.rb @@ -0,0 +1,14 @@ +require "spec_helper" + +describe Workers::ReceiveLocalBatch do + it "calls the postzord" do + post = double + allow(Post).to receive(:find).with(1).and_return(post) + + zord = double + expect(Postzord::Receiver::LocalBatch).to receive(:new).with(post, [2]).and_return(zord) + expect(zord).to receive(:perform!) + + Workers::ReceiveLocalBatch.new.perform("Post", 1, [2]) + end +end -- cgit v1.2.3