more tests

v1.18.x
Barış Soner Uşaklı 8 years ago
parent 14398a2d90
commit 35ff71c37d

@ -182,10 +182,25 @@ describe('Topic\'s', function () {
}); });
}); });
describe('.getTopicData', function () {
it('should not receive errors', function (done) { it('should not receive errors', function (done) {
topics.getTopicData(newTopic.tid, done); topics.getTopicData(newTopic.tid, done);
}); });
it('should get topic title by pid', function (done) {
topics.getTitleByPid(newPost.pid, function (err, title) {
assert.ifError(err);
assert.equal(title, topic.title);
done();
});
});
it('should get topic data by pid', function (done) {
topics.getTopicDataByPid(newPost.pid, function (err, data) {
assert.ifError(err);
assert.equal(data.tid, newTopic.tid);
done();
});
}); });
describe('.getTopicWithPosts', function () { describe('.getTopicWithPosts', function () {

Loading…
Cancel
Save