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:
authorFlorian Staudacher <florian_staudacher@yahoo.de>2014-09-27 18:18:37 +0400
committerFlorian Staudacher <florian_staudacher@yahoo.de>2014-09-27 18:18:37 +0400
commitc7b4b77ce8e3b188681b852d4c83bc0f06d7ee5e (patch)
treec01203b81a6506bfb7c7674250badc39cb116b4f /spec/workers
parent430d5bd2e9d7b8fdccfbc4135201e981a3a53763 (diff)
parent9520d06c7bc1a2e2001820245b8147084f4d7d94 (diff)
Merge pull request #5209 from jhass/federation_improvements
Federation improvements
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/deferred_dispatch_spec.rb9
-rw-r--r--spec/workers/process_photo_spec.rb8
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/workers/deferred_dispatch_spec.rb b/spec/workers/deferred_dispatch_spec.rb
new file mode 100644
index 000000000..f0a20d768
--- /dev/null
+++ b/spec/workers/deferred_dispatch_spec.rb
@@ -0,0 +1,9 @@
+require 'spec_helper'
+
+describe Workers::DeferredDispatch do
+ it "handles non existing records gracefully" do
+ expect {
+ described_class.new.perform(alice.id, 'Comment', 0, {})
+ }.to_not raise_error
+ end
+end
diff --git a/spec/workers/process_photo_spec.rb b/spec/workers/process_photo_spec.rb
index 8294902ca..8e28fba74 100644
--- a/spec/workers/process_photo_spec.rb
+++ b/spec/workers/process_photo_spec.rb
@@ -61,6 +61,12 @@ describe Workers::ProcessPhoto do
expect{
result = Workers::ProcessPhoto.new.perform(p.id)
}.to_not raise_error
-
+
+ end
+
+ it 'handles already deleted photos gracefully' do
+ expect {
+ Workers::ProcessPhoto.new.perform(0)
+ }.to_not raise_error
end
end