fix group test

v1.18.x
Barış Soner Uşaklı
parent 9ae5946e7a
commit bc18b489e6

@ -1336,13 +1336,17 @@ describe('Controllers', function () {
name: 'selectedGroup', name: 'selectedGroup',
}, function (err) { }, function (err) {
assert.ifError(err); assert.ifError(err);
groups.join('selectedGroup', fooUid, function (err) { user.create({ username: 'groupie' }, function (err, uid) {
assert.ifError(err); assert.ifError(err);
request(nconf.get('url') + '/api/user/foo', { json: true }, function (err, res, body) { groups.join('selectedGroup', uid, function (err) {
assert.ifError(err); assert.ifError(err);
assert.equal(res.statusCode, 200); request(nconf.get('url') + '/api/user/groupie', { json: true }, function (err, res, body) {
assert(body.selectedGroup.name, 'selectedGroup'); assert.ifError(err);
done(); assert.equal(res.statusCode, 200);
assert(Array.isArray(body.selectedGroup));
assert.equal(body.selectedGroup[0].name, 'selectedGroup');
done();
});
}); });
}); });
}); });

Loading…
Cancel
Save