Node.js based forum software built for the modern web
test latest member posts
barisusaklid60930a51dd2
diff --git a/test/controllers.js b/test/controllers.jsindex 1cd9f17eda..2ddbd6d914 100644--- a/test/controllers.js+++ b/test/controllers.js@@ -498,11 +498,23 @@ describe('Controllers', function () {hidden: 0,}, function (err) {assert.ifError(err);- request(nconf.get('url') + '/groups/group-details', function (err, res, body) {+ groups.join('group-details', fooUid, function (err) {assert.ifError(err);- assert.equal(res.statusCode, 200);- assert(body);- done();+ topics.post({+ uid: fooUid,+ title: 'topic title',+ content: 'test topic content',+ cid: cid,+ }, function (err) {+ assert.ifError(err);+ request(nconf.get('url') + '/api/groups/group-details', {json: true}, function (err, res, body) {+ assert.ifError(err);+ assert.equal(res.statusCode, 200);+ assert(body);+ assert.equal(body.posts[0].content, 'test topic content');+ done();+ });+ });});});});