diff --git a/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js b/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js index 481894e91f..ac15897ef1 100644 --- a/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js +++ b/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js @@ -68,7 +68,7 @@ describe('AuthenticationController', function() { hooks: { fire: sinon.stub().yields(null, []) } }), '../Notifications/NotificationsBuilder': (this.NotificationsBuilder = { - ipMatcherAffiliation: sinon.stub() + ipMatcherAffiliation: sinon.stub().returns({ create: sinon.stub() }) }), '../../models/User': { User: this.UserModel }, '../../../../modules/oauth2-server/app/src/Oauth2Server': (this.Oauth2Server = { diff --git a/services/web/test/unit/src/helpers/MockRequest.js b/services/web/test/unit/src/helpers/MockRequest.js index 841b99833f..c270feb401 100644 --- a/services/web/test/unit/src/helpers/MockRequest.js +++ b/services/web/test/unit/src/helpers/MockRequest.js @@ -9,6 +9,7 @@ class MockRequest { static initClass() { this.prototype.session = { destroy() {} } + this.prototype.ip = '42.42.42.42' this.prototype.headers = {} this.prototype.params = {} this.prototype.query = {}