FIX: Missing User objects in Utilities

This commit is contained in:
Robin Ward
2019-11-13 15:55:32 -05:00
parent f5ed0dc2e6
commit bc2067898e
12 changed files with 49 additions and 35 deletions

View File

@ -3,6 +3,7 @@ import { next } from "@ember/runloop";
import Topic from "discourse/models/topic";
import PostStream from "discourse/models/post-stream";
import { Placeholder } from "discourse/lib/posts-with-placeholders";
import User from "discourse/models/user";
moduleFor("controller:topic", "controller:topic", {
needs: [
@ -223,7 +224,7 @@ QUnit.test("canDeleteSelected", function(assert) {
],
stream: [1, 2, 3]
};
const currentUser = Discourse.User.create({ admin: false });
const currentUser = User.create({ admin: false });
this.registry.register("current-user:main", currentUser, {
instantiate: false
});
@ -316,7 +317,7 @@ QUnit.test("Can split/merge topic", function(assert) {
});
QUnit.test("canChangeOwner", function(assert) {
const currentUser = Discourse.User.create({ admin: false });
const currentUser = User.create({ admin: false });
this.registry.register("current-user:main", currentUser, {
instantiate: false
});