Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonne Haß <me@jhass.eu>2015-04-01 05:00:49 +0300
committerJonne Haß <me@jhass.eu>2015-04-01 05:01:40 +0300
commit548b0d8161473f12d66663b2657810410a4d3405 (patch)
tree38bb9ec9b35b059850e6bc4086aaba83d7df7a8e /spec/workers
parent5c78ab68381bbde9377d15fa53b481045cca9e95 (diff)
Rescue correct constant in Workers::ReceiveLocalBatch
Fixes #5834
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/receive_local_batch_spec.rb14
1 files changed, 14 insertions, 0 deletions
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