tests: topic.js: fixed description to mirror code, refactored asserts since mocha's 'done' can process errors in callback

v1.18.x
Denis Wolf 12 years ago
parent cbbb7a7c8e
commit 7c3fa30c13

@ -62,18 +62,14 @@ describe('Topic\'s', function() {
}); });
describe('.getTopicData', function() { describe('.getTopicData', function() {
it('should get Topic data', function(done) { it('should not receive errors', function(done) {
Topics.getTopicData(newTopic.tid, function(err, result) { Topics.getTopicData(newTopic.tid, done);
done.apply(this.arguments);
});
}); });
}); });
describe('.getTopicDataWithUser', function() { describe('.getTopicDataWithUser', function() {
it('should get Topic data with user info', function(done) { it('should not receive errors', function(done) {
Topics.getTopicDataWithUser(newTopic.tid, function(err, result) { Topics.getTopicDataWithUser(newTopic.tid, done);
done.apply(this.arguments);
});
}); });
}); });
}); });

Loading…
Cancel
Save