mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:16:08 +08:00
DEV: Remove some extra Discourse.Site
uses
This commit is contained in:
parent
bc2067898e
commit
a4b89f8187
|
@ -3,6 +3,7 @@ import createStore from "helpers/create-store";
|
|||
import { autoLoadModules } from "discourse/initializers/auto-load-modules";
|
||||
import TopicTrackingState from "discourse/models/topic-tracking-state";
|
||||
import User from "discourse/models/user";
|
||||
import Site from "discourse/models/site";
|
||||
|
||||
export default function(name, opts) {
|
||||
opts = opts || {};
|
||||
|
@ -12,7 +13,7 @@ export default function(name, opts) {
|
|||
}
|
||||
|
||||
test(name, function(assert) {
|
||||
this.site = Discourse.Site.current();
|
||||
this.site = Site.current();
|
||||
|
||||
this.registry.register("site-settings:main", Discourse.SiteSettings, {
|
||||
instantiate: false
|
||||
|
|
|
@ -2,6 +2,7 @@ import { run } from "@ember/runloop";
|
|||
import createStore from "helpers/create-store";
|
||||
import NavItem from "discourse/models/nav-item";
|
||||
import Category from "discourse/models/category";
|
||||
import Site from "discourse/models/site";
|
||||
|
||||
QUnit.module("NavItem", {
|
||||
beforeEach() {
|
||||
|
@ -10,7 +11,7 @@ QUnit.module("NavItem", {
|
|||
name: "确实是这样",
|
||||
id: 343434
|
||||
});
|
||||
Discourse.Site.currentProp("categories").addObject(asianCategory);
|
||||
Site.currentProp("categories").addObject(asianCategory);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import createStore from "helpers/create-store";
|
||||
import Site from "discourse/models/site";
|
||||
|
||||
QUnit.module("model:site");
|
||||
|
||||
QUnit.test("create", assert => {
|
||||
assert.ok(Discourse.Site.create(), "it can create with no parameters");
|
||||
assert.ok(Site.create(), "it can create with no parameters");
|
||||
});
|
||||
|
||||
QUnit.test("instance", assert => {
|
||||
const site = Discourse.Site.current();
|
||||
const site = Site.current();
|
||||
|
||||
assert.present(site, "We have a current site singleton");
|
||||
assert.present(
|
||||
|
|
Loading…
Reference in New Issue
Block a user