analytics tests, reduce bcrypt rouds for tests

This commit is contained in:
barisusakli
2016-11-18 15:57:53 +03:00
parent e3616ab0f9
commit 9796f54580
4 changed files with 190 additions and 163 deletions

View File

@@ -322,6 +322,24 @@ describe('socket.io', function () {
});
});
it('should get daily analytics', function (done) {
io.emit('admin.analytics.get', {graph: 'traffic', units: 'days'}, function (err, data) {
assert.ifError(err);
assert(data);
assert(data.monthlyPageViews);
done();
});
});
it('should get hourly analytics', function (done) {
io.emit('admin.analytics.get', {graph: 'traffic', units: 'hours'}, function (err, data) {
assert.ifError(err);
assert(data);
assert(data.monthlyPageViews);
done();
});
});
after(function (done) {
db.emptydb(done);
});