mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:11:13 +08:00
REFACTOR: Migrate Discourse.Post
to imports
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
QUnit.module("model:post-stream");
|
||||
|
||||
import Post from "discourse/models/post";
|
||||
import createStore from "helpers/create-store";
|
||||
|
||||
QUnit.module("model:post-stream");
|
||||
|
||||
const buildStream = function(id, stream) {
|
||||
const store = createStore();
|
||||
const topic = store.createRecord("topic", { id, chunk_size: 5 });
|
||||
@ -173,7 +174,7 @@ QUnit.test("updateFromJson", assert => {
|
||||
});
|
||||
|
||||
assert.equal(postStream.get("posts.length"), 1, "it loaded the posts");
|
||||
assert.containsInstance(postStream.get("posts"), Discourse.Post);
|
||||
assert.containsInstance(postStream.get("posts"), Post);
|
||||
|
||||
assert.equal(postStream.get("extra_property"), 12);
|
||||
});
|
||||
|
Reference in New Issue
Block a user