Skip to content
Extraits de code Groupes Projets
Valider f4c756cd rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

use URI.join in the specs too

parent 6d682d6c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -196,7 +196,7 @@ describe Reshare, :type => :model do ...@@ -196,7 +196,7 @@ describe Reshare, :type => :model do
allow(@response).to receive(:body).and_return(@root_object.to_diaspora_xml) 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) Reshare.from_xml(@xml)
end end
...@@ -224,7 +224,7 @@ describe Reshare, :type => :model do ...@@ -224,7 +224,7 @@ describe Reshare, :type => :model do
context 'saving the post' do context 'saving the post' do
before do before do
allow(@response).to receive(:body).and_return(@root_object.to_diaspora_xml) 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 end
it 'fetches the root post from root_guid' do it 'fetches the root post from root_guid' do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter