diff options
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/deferred_dispatch_spec.rb | 9 | ||||
-rw-r--r-- | spec/workers/process_photo_spec.rb | 8 |
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 |