|
|
@ -44,7 +44,7 @@ describe('Categories', function() {
|
|
|
|
|
|
|
|
|
|
|
|
describe('.getCategoryTopics', function() {
|
|
|
|
describe('.getCategoryTopics', function() {
|
|
|
|
it('should return a list of topics', function(done) {
|
|
|
|
it('should return a list of topics', function(done) {
|
|
|
|
Categories.getCategoryTopics(categoryObj.cid, 0, 10, 0, function(topics) {
|
|
|
|
Categories.getCategoryTopics(categoryObj.cid, 0, 10, 0, function(err, topics) {
|
|
|
|
assert(Array.isArray(topics));
|
|
|
|
assert(Array.isArray(topics));
|
|
|
|
assert(topics.every(function(topic) {
|
|
|
|
assert(topics.every(function(topic) {
|
|
|
|
return topic instanceof Object;
|
|
|
|
return topic instanceof Object;
|
|
|
|