Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/federation/shared_receive_stream_items.rb')
-rw-r--r--spec/integration/federation/shared_receive_stream_items.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/integration/federation/shared_receive_stream_items.rb b/spec/integration/federation/shared_receive_stream_items.rb
index 347848e35..1431b9e1a 100644
--- a/spec/integration/federation/shared_receive_stream_items.rb
+++ b/spec/integration/federation/shared_receive_stream_items.rb
@@ -8,6 +8,15 @@ shared_examples_for "messages which are indifferent about sharing fact" do
it "treats status message receive correctly" do
entity = Fabricate(:status_message_entity, author: sender_id, public: public)
+ if public
+ expect(Diaspora::Federation::Dispatcher).to receive(:build) do |_user, participation, _opts|
+ expect(participation.target.guid).to eq(entity.guid)
+ instance_double(:dispatch)
+ end
+ else
+ expect(Diaspora::Federation::Dispatcher).not_to receive(:build)
+ end
+
post_message(generate_payload(entity, sender, recipient), recipient)
expect(StatusMessage.exists?(guid: entity.guid)).to be_truthy