mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:31:18 +08:00
FIX: ensures reports links are correct on subfolder installs
This commit is contained in:
@ -515,4 +515,22 @@ QUnit.test("computed labels", assert => {
|
||||
"<a href='/t/-/2/3'>This is the beginning of</a>"
|
||||
);
|
||||
assert.equal(computedPostLabel.value, "This is the beginning of");
|
||||
|
||||
// subfolder support
|
||||
Discourse.BaseUri = "/forum";
|
||||
|
||||
const postLink = computedLabels[5].compute(row).formatedValue;
|
||||
assert.equal(
|
||||
postLink,
|
||||
"<a href='/forum/t/-/2/3'>This is the beginning of</a>"
|
||||
);
|
||||
|
||||
const topicLink = computedLabels[4].compute(row).formatedValue;
|
||||
assert.equal(topicLink, "<a href='/forum/t/-/2'>Test topic</a>");
|
||||
|
||||
const userLink = computedLabels[0].compute(row).formatedValue;
|
||||
assert.equal(
|
||||
userLink,
|
||||
"<a href='/forum/admin/users/1/joffrey'><img alt='' width='20' height='20' src='/forum/' class='avatar' title='joffrey'><span class='username'>joffrey</span></a>"
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user