diaspora/spec/models/jobs/delete_post_from_service_spec.rb
2013-02-18 18:21:59 +00:00

16 lines
471 B
Ruby

require 'spec_helper'
describe Jobs::DeletePostFromService do
before do
@user = alice
@post = @user.post(:status_message, :text => "hello", :to =>@user.aspects.first.id, :public =>true, :facebook_id => "23456" )
end
it 'calls service#delete_post with given service' do
m = mock()
url = "foobar"
m.should_receive(:delete_post)
Service.stub!(:find_by_id).and_return(m)
Jobs::DeletePostFromService.perform("123", @post.id.to_s)
end
end