DEV: Move Discourse.getURL and related functions to a module (#9966)
* DEV: Move `Discourse.getURL` and related functions to a module * DEV: Remove `Discourse.getURL` and `Discourse.getURLWithCDN` * FIX: `get-url` is required for server side code * DEV: Deprecate `BaseUri` too.
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
url,
|
||||
htmlSafe
|
||||
} from "discourse/lib/computed";
|
||||
import { setPrefix } from "discourse-common/lib/get-url";
|
||||
|
||||
QUnit.module("lib:computed", {
|
||||
beforeEach() {
|
||||
@@ -148,7 +149,7 @@ QUnit.test("url", assert => {
|
||||
"it supports urls without a prefix"
|
||||
);
|
||||
|
||||
Discourse.BaseUri = "/prefixed";
|
||||
setPrefix("/prefixed");
|
||||
t = testClass.create({ username: "eviltrout" });
|
||||
assert.equal(
|
||||
t.get("userUrl"),
|
||||
|
||||
Reference in New Issue
Block a user