Move NotificationsError to BoxError

This commit is contained in:
Girish Ramakrishnan
2019-10-22 12:59:26 -07:00
parent 812f5cce99
commit 88818a1ec2
3 changed files with 33 additions and 49 deletions

View File

@@ -7,12 +7,12 @@
'use strict';
var async = require('async'),
BoxError = require('../boxerror.js'),
database = require('../database.js'),
users = require('../users.js'),
userdb = require('../userdb.js'),
eventlogdb = require('../eventlogdb.js'),
notifications = require('../notifications.js'),
NotificationsError = notifications.NotificationsError,
expect = require('expect.js');
// owner
@@ -92,8 +92,8 @@ describe('Notifications', function () {
it('get of unknown id fails', function (done) {
notifications.get('notfoundid', function (error, result) {
expect(error).to.be.a(NotificationsError);
expect(error.reason).to.be(NotificationsError.NOT_FOUND);
expect(error).to.be.a(BoxError);
expect(error.reason).to.be(BoxError.NOT_FOUND);
expect(result).to.not.be.ok();
done();
@@ -128,8 +128,8 @@ describe('Notifications', function () {
it('ack fails for nonexisting id', function (done) {
notifications.ack('id does not exist', function (error) {
expect(error).to.be.a(NotificationsError);
expect(error.reason).to.be(NotificationsError.NOT_FOUND);
expect(error).to.be.a(BoxError);
expect(error.reason).to.be(BoxError.NOT_FOUND);
done();
});