Make tests work

the namecheap test never seems to work
This commit is contained in:
Girish Ramakrishnan
2019-03-23 09:46:04 -07:00
parent bec63c1ad0
commit 9647ce153d
6 changed files with 47 additions and 39 deletions
+5 -2
View File
@@ -11,6 +11,7 @@ var async = require('async'),
users = require('../users.js'),
userdb = require('../userdb.js'),
eventlogdb = require('../eventlogdb.js'),
notificationdb = require('../notificationdb.js'),
notifications = require('../notifications.js'),
NotificationsError = notifications.NotificationsError,
expect = require('expect.js');
@@ -157,12 +158,14 @@ describe('Notifications', function () {
}, function (error) {
expect(error).to.eql(null);
notifications.getAllPaged(USER_0.id, null, 2, 10, function (error, results) {
notifications.getAllPaged(USER_0.id, null /* ack */, 2, 10, function (error, results) {
expect(error).to.eql(null);
expect(results).to.be.an(Array);
expect(results.length).to.be(10);
expect(results[0].title).to.equal('title9');
// we cannot compare the title because ordering is by time which is stored in mysql with seconds
// precision. making the ordering random...
// expect(results[0].title).to.equal('title9');
done();
});