mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
Fix broken JS tests.
This commit is contained in:
@ -24,6 +24,13 @@ QUnit.test('has a postStream', assert => {
|
||||
assert.equal(postStream.get('topic'), topic, "the postStream has a reference back to the topic");
|
||||
});
|
||||
|
||||
QUnit.test('has suggestedTopics', assert => {
|
||||
const topic = Topic.create({ suggested_topics: [{ id: 1 }, { id: 2 }] });
|
||||
const suggestedTopics = topic.get('suggestedTopics');
|
||||
|
||||
assert.equal(suggestedTopics.length, 2, 'it loaded the suggested_topics');
|
||||
assert.containsInstance(suggestedTopics, Topic);
|
||||
});
|
||||
|
||||
QUnit.test('category relationship', assert => {
|
||||
// It finds the category by id
|
||||
|
Reference in New Issue
Block a user