mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: update base url links to respect subfolder installs (#27740)
This change eliminates a couple of instances where subfolder urls are badly formatted, in most cases we can use Discourse.base_url_no_prefix to prevent adding the subfolder to the base url.
This commit is contained in:
11
spec/helpers/email_helper_spec.rb
Normal file
11
spec/helpers/email_helper_spec.rb
Normal file
@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe EmailHelper do
|
||||
describe "#email_topic_link" do
|
||||
it "respects subfolder" do
|
||||
set_subfolder "/forum"
|
||||
topic = Fabricate(:topic)
|
||||
expect(helper.email_topic_link(topic)).to include("#{Discourse.base_url_no_prefix}/forum/t")
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user