mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Convert front end paths from /users/
to /u/
This commit is contained in:
@ -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');
|
||||
});
|
||||
|
Reference in New Issue
Block a user