mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Convert front end paths from /users/
to /u/
This commit is contained in:
parent
6b976433c9
commit
45a257815a
40 changed files with 129 additions and 84 deletions
|
@ -1,4 +1,4 @@
|
|||
import DiscourseURL from 'discourse/lib/url';
|
||||
import { default as DiscourseURL, userPath } from 'discourse/lib/url';
|
||||
|
||||
module("lib:url");
|
||||
|
||||
|
@ -25,3 +25,9 @@ test("isInternal on subfolder install", function() {
|
|||
not(DiscourseURL.isInternal("http://eviltrout.com/tophat"), "a url on the same host but on a different folder is not internal");
|
||||
ok(DiscourseURL.isInternal("http://eviltrout.com/forum/moustache"), "a url on the same host and on the same folder is internal");
|
||||
});
|
||||
|
||||
test("userPath", assert => {
|
||||
assert.equal(userPath(), '/u');
|
||||
assert.equal(userPath('eviltrout'), '/u/eviltrout');
|
||||
assert.equal(userPath('hp.json'), '/u/hp.json');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue