mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
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:
@ -1,4 +1,5 @@
|
||||
import EmailLog from "admin/models/email-log";
|
||||
import { setPrefix } from "discourse-common/lib/get-url";
|
||||
|
||||
QUnit.module("Discourse.EmailLog");
|
||||
|
||||
@ -7,7 +8,7 @@ QUnit.test("create", assert => {
|
||||
});
|
||||
|
||||
QUnit.test("subfolder support", assert => {
|
||||
Discourse.BaseUri = "/forum";
|
||||
setPrefix("/forum");
|
||||
const attrs = {
|
||||
id: 60,
|
||||
to_address: "wikiman@asdf.com",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Report from "admin/models/report";
|
||||
import { setPrefix } from "discourse-common/lib/get-url";
|
||||
|
||||
QUnit.module("Report");
|
||||
|
||||
@ -528,7 +529,7 @@ QUnit.test("computed labels", assert => {
|
||||
assert.equal(computedFilesizeLabel.value, 582641);
|
||||
|
||||
// subfolder support
|
||||
Discourse.BaseUri = "/forum";
|
||||
setPrefix("/forum");
|
||||
|
||||
const postLink = computedLabels[5].compute(row).formatedValue;
|
||||
assert.equal(
|
||||
|
Reference in New Issue
Block a user