pushing so dan can look at how to stub EM:next_tick correctly
This commit is contained in:
parent
62b4e85b0b
commit
c65c62906c
2 changed files with 4 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ module Diaspora
|
|||
def receive_retraction retraction
|
||||
if retraction.type == 'Person'
|
||||
unless retraction.person.id.to_s == retraction.post_id.to_s
|
||||
Rails.logger.info("event=receive status=abort reason='sender is not the person he is trying to retract' recipient=#{self.diaspora_handle} sender=#{salmon_author.diaspora_handle} payload_type=#{retraction.class} retraction_type=person")
|
||||
Rails.logger.info("event=receive status=abort reason='sender is not the person he is trying to retract' recipient=#{self.diaspora_handle} sender=#{retraction.person.diaspora_handle} payload_type=#{retraction.class} retraction_type=person")
|
||||
return
|
||||
end
|
||||
disconnected_by visible_person_by_id(retraction.post_id)
|
||||
|
|
@ -147,7 +147,7 @@ module Diaspora
|
|||
Rails.logger.info("event=receive payload_type=#{post.class} update=false status=complete sender=#{post.diaspora_handle}")
|
||||
post
|
||||
else
|
||||
Rails.logger.info("event=receive payload_type=#{post.class} update=true status=abort sender=#{post.diaspora_handle} reason='update not from post owner' existing_post=#{known_post.id}")
|
||||
Rails.logger.info("event=receive payload_type=#{post.class} update=true status=abort sender=#{post.diaspora_handle} reason='update not from post owner' existing_post=#{post.id}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ describe StatusMessagesController do
|
|||
request.env["HTTP_REFERER"] = ""
|
||||
sign_in :user, user
|
||||
@controller.stub!(:current_user).and_return(user)
|
||||
|
||||
EM.stub!(:next_tick).with(&block).and_return{|x| x.call}
|
||||
end
|
||||
|
||||
describe '#show' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue