From f4c756cd34bae6bb4f991a1b464b8bf364041c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Tue, 9 Dec 2014 17:27:27 +0100 Subject: [PATCH] use URI.join in the specs too --- spec/models/reshare_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/reshare_spec.rb b/spec/models/reshare_spec.rb index 929ded2b9..ecc24c9de 100644 --- a/spec/models/reshare_spec.rb +++ b/spec/models/reshare_spec.rb @@ -196,7 +196,7 @@ describe Reshare, :type => :model do allow(@response).to receive(:body).and_return(@root_object.to_diaspora_xml) - expect(Faraday.default_connection).to receive(:get).with(@original_author.url + short_post_path(@root_object.guid, :format => "xml")).and_return(@response) + expect(Faraday.default_connection).to receive(:get).with(URI.join(@original_author.url, short_post_path(@root_object.guid, :format => "xml"))).and_return(@response) Reshare.from_xml(@xml) end @@ -224,7 +224,7 @@ describe Reshare, :type => :model do context 'saving the post' do before do allow(@response).to receive(:body).and_return(@root_object.to_diaspora_xml) - allow(Faraday.default_connection).to receive(:get).with(@reshare.root.author.url + short_post_path(@root_object.guid, :format => "xml")).and_return(@response) + allow(Faraday.default_connection).to receive(:get).with(URI.join(@reshare.root.author.url, short_post_path(@root_object.guid, :format => "xml"))).and_return(@response) end it 'fetches the root post from root_guid' do