mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 09:21:48 +08:00
FIX: getURL on a subfolder site should ignore prefix in middle of URL (#8794)
This commit is contained in:
@ -10,6 +10,18 @@ QUnit.test("getURL on subfolder install", assert => {
|
||||
"/forum/u/neil",
|
||||
"relative url has subfolder"
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
Discourse.getURL("/svg-sprite/forum.example.com/svg-sprite.js"),
|
||||
"/forum/svg-sprite/forum.example.com/svg-sprite.js",
|
||||
"works when the url has the prefix in the middle"
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
Discourse.getURL("/forum/t/123"),
|
||||
"/forum/t/123",
|
||||
"does not prefix if the URL is already prefixed"
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("getURLWithCDN on subfolder install with S3", assert => {
|
||||
|
Reference in New Issue
Block a user