Convert front end paths from /users/ to /u/

This commit is contained in:
Robin Ward
2017-03-28 12:16:58 -04:00
parent 6b976433c9
commit 45a257815a
40 changed files with 129 additions and 84 deletions

View File

@ -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');
});