FIX: wrong category links on subfolder install in rss feed for a category topic list

This commit is contained in:
Neil Lalonde
2018-09-07 10:03:30 -04:00
parent fb96ab4464
commit 9e77fd8fc3
2 changed files with 11 additions and 2 deletions

View File

@ -393,6 +393,15 @@ RSpec.describe ListController do
expect(response.status).to eq(200)
expect(response.content_type).to eq('application/rss+xml')
end
it "renders RSS in subfolder correctly" do
GlobalSetting.stubs(:relative_url_root).returns('/forum')
Discourse.stubs(:base_uri).returns("/forum")
get "/c/#{category.slug}.rss"
expect(response.status).to eq(200)
expect(response.body).to_not include("/forum/forum")
expect(response.body).to include("http://test.localhost/forum/c/#{category.slug}")
end
end
describe "category default views" do