diff options
Diffstat (limited to 'spec/workers/deferred_dispatch_spec.rb')
-rw-r--r-- | spec/workers/deferred_dispatch_spec.rb | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/spec/workers/deferred_dispatch_spec.rb b/spec/workers/deferred_dispatch_spec.rb index ae97e18e9..214106d8d 100644 --- a/spec/workers/deferred_dispatch_spec.rb +++ b/spec/workers/deferred_dispatch_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require "spec_helper" describe Workers::DeferredDispatch do it "handles non existing records gracefully" do @@ -6,34 +6,4 @@ describe Workers::DeferredDispatch do described_class.new.perform(alice.id, "Comment", 0, {}) }.to_not raise_error end - - describe "#social relay functionality" do - let(:message) { FactoryGirl.create(:status_message, author: alice.person, public: true) } - before do - skip # TODO - AppConfig.relay.outbound.send = true - end - - it "triggers fetch of relay handle" do - allow(Person).to receive(:find_by).and_return(nil) - - expect(Workers::FetchWebfinger).to receive(:perform_async) - - described_class.new.perform(alice.id, "StatusMessage", message.id, {}) - end - - it "triggers post to relay" do - relay_person = FactoryGirl.create(:person, diaspora_handle: AppConfig.relay.outbound.handle) - opts = {"additional_subscribers" => [relay_person], "services" => []} - allow(Person).to receive(:find_by).and_return(relay_person) - postzord = double - allow(Postzord::Dispatcher).to receive(:build).with(any_args).and_return(postzord) - allow(postzord).to receive(:post) - allow(Person).to receive(:where).and_return([relay_person]) - - expect(Postzord::Dispatcher).to receive(:build).with(alice, message, opts) - - described_class.new.perform(alice.id, "StatusMessage", message.id, {}) - end - end end |