Merge branch 'release/0.5.0.0-RC' into develop

This commit is contained in:
Jonne Haß 2015-04-01 04:02:47 +02:00
commit 5dd5f0b176
3 changed files with 15 additions and 4 deletions

View file

@ -151,11 +151,8 @@ GEM
devise-token_authenticatable (0.3.0)
devise (~> 3.4.0)
devise_lastseenable (0.0.4)
devise
devise
rails (>= 3.0.4)
rails (>= 3.0.4)
warden
warden
diaspora-vines (0.1.27)
activerecord (~> 4.1)

View file

@ -10,7 +10,7 @@ module Workers
object = object_class_string.constantize.find(object_id)
receiver = Postzord::Receiver::LocalBatch.new(object, recipient_user_ids)
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

View 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