Merge branch 'release/0.5.0.0-RC' into develop
This commit is contained in:
commit
5dd5f0b176
3 changed files with 15 additions and 4 deletions
|
|
@ -151,11 +151,8 @@ GEM
|
||||||
devise-token_authenticatable (0.3.0)
|
devise-token_authenticatable (0.3.0)
|
||||||
devise (~> 3.4.0)
|
devise (~> 3.4.0)
|
||||||
devise_lastseenable (0.0.4)
|
devise_lastseenable (0.0.4)
|
||||||
devise
|
|
||||||
devise
|
devise
|
||||||
rails (>= 3.0.4)
|
rails (>= 3.0.4)
|
||||||
rails (>= 3.0.4)
|
|
||||||
warden
|
|
||||||
warden
|
warden
|
||||||
diaspora-vines (0.1.27)
|
diaspora-vines (0.1.27)
|
||||||
activerecord (~> 4.1)
|
activerecord (~> 4.1)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ module Workers
|
||||||
object = object_class_string.constantize.find(object_id)
|
object = object_class_string.constantize.find(object_id)
|
||||||
receiver = Postzord::Receiver::LocalBatch.new(object, recipient_user_ids)
|
receiver = Postzord::Receiver::LocalBatch.new(object, recipient_user_ids)
|
||||||
receiver.perform!
|
receiver.perform!
|
||||||
rescue ActiveRecord::NotFound # Already deleted before the job could run
|
rescue ActiveRecord::RecordNotFound # Already deleted before the job could run
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
14
spec/workers/receive_local_batch_spec.rb
Normal file
14
spec/workers/receive_local_batch_spec.rb
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue