Move NotificationsError to BoxError
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user