fix: csv test

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 700ef1af97
commit 3de692cd52

@ -264,16 +264,22 @@ describe('Admin Controllers', function () {
}); });
it('should load /admin/users/csv', function (done) { it('should load /admin/users/csv', function (done) {
request(nconf.get('url') + '/api/admin/users/csv', { const socketAdmin = require('../src/socket.io/admin');
jar: jar, socketAdmin.user.exportUsersCSV({ uid: adminUid }, {}, function (err) {
headers: { assert.ifError(err);
referer: nconf.get('url') + '/admin/manage/users', setTimeout(function () {
}, request(nconf.get('url') + '/api/admin/users/csv', {
}, function (err, res, body) { jar: jar,
assert.ifError(err); headers: {
assert.equal(res.statusCode, 200); referer: nconf.get('url') + '/admin/manage/users',
assert(body); },
done(); }, function (err, res, body) {
assert.ifError(err);
assert.equal(res.statusCode, 200);
assert(body);
done();
});
}, 2000);
}); });
}); });

Loading…
Cancel
Save