Node.js based forum software built for the modern web
topics.reply test
barisusakli834ca016ecef
diff --git a/tests/topics.js b/tests/topics.jsindex 840a73bb50..9ca300d470 100644--- a/tests/topics.js+++ b/tests/topics.js@@ -81,6 +81,28 @@ describe('Topic\'s', function() {});});+ describe('.reply', function() {+ var newTopic;+ var newPost;++ before(function(done) {+ topics.post({uid: topic.userId, title: topic.title, content: topic.content, cid: topic.categoryId}, function(err, result) {+ newTopic = result.topicData;+ newPost = result.postData;+ done();+ });+ });++ it('should create a new reply with proper parameters', function(done) {+ topics.reply({uid: topic.userId, content: 'test post', tid: newTopic.tid}, function(err, result) {+ assert.equal(err, null, 'was created with error');+ assert.ok(result);++ done();+ });+ });+ });+describe('Get methods', function() {var newTopic;var newPost;