topics.reply test

v1.18.x
barisusakli 10 years ago
parent c0fc7e9ca4
commit 834ca016ec

@ -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;

Loading…
Cancel
Save