FIX: links in rss feeds are sometimes wrong on subfolder installs

This commit is contained in:
Neil Lalonde
2018-08-27 18:05:08 -04:00
parent d6144c6d60
commit ebe7835316
5 changed files with 34 additions and 3 deletions

View File

@@ -161,7 +161,18 @@ describe TopicView do
end
it "provides an absolute url" do
expect(topic_view.absolute_url).to be_present
expect(topic_view.absolute_url).to eq("http://test.localhost/t/#{topic.slug}/#{topic.id}")
end
context 'subfolder' do
before do
GlobalSetting.stubs(:relative_url_root).returns('/forum')
Discourse.stubs(:base_uri).returns("/forum")
end
it "provides the correct absolute url" do
expect(topic_view.absolute_url).to eq("http://test.localhost/forum/t/#{topic.slug}/#{topic.id}")
end
end
it "provides a summary of the first post" do