mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
FIX: Post moved small action links should respect subfolder installs (#24336)
This change fixes an issue with small action links (when post is moved) to add the subfolder path to the url.
This commit is contained in:
@ -2135,6 +2135,17 @@ RSpec.describe Post do
|
||||
end
|
||||
end
|
||||
|
||||
describe "relative_url" do
|
||||
it "returns the correct post url with subfolder install" do
|
||||
set_subfolder "/forum"
|
||||
post = Fabricate(:post)
|
||||
|
||||
expect(post.relative_url).to eq(
|
||||
"/forum/t/#{post.topic.slug}/#{post.topic.id}/#{post.post_number}",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe "public_posts_count_per_day" do
|
||||
before do
|
||||
freeze_time DateTime.parse("2017-03-01 12:00")
|
||||
|
Reference in New Issue
Block a user