added intergration test for dispatcher
This commit is contained in:
parent
defeb42721
commit
e26b614e1d
1 changed files with 24 additions and 0 deletions
24
spec/integration/dispatching_spec.rb
Normal file
24
spec/integration/dispatching_spec.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'dispatching' do
|
||||
before do
|
||||
@luke, @leia, @raph = set_up_friends
|
||||
end
|
||||
|
||||
context "lukes' comment on luke's public post gets retracted" do
|
||||
it 'should not trigger a public dispatch' do
|
||||
#luke has a public post and comments on it
|
||||
p = Factory(:status_message, :public => true, :author => @luke.person)
|
||||
c = @luke.comment("awesomesauseum", :post => p)
|
||||
|
||||
|
||||
Postzord::Dispatcher::Public.should_not_receive(:new)
|
||||
Postzord::Dispatcher::Private.should_receive(:new).and_return(stub(:post => true))
|
||||
#luke now retracts his comment
|
||||
fantasy_resque do
|
||||
@luke.retract(c)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Reference in a new issue