mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #3750 from overleaf/jpa-req-ip-in-unit-tests
[misc] test/unit: add req.ip to MockRequest helper GitOrigin-RevId: 07b1cf11f20eccb4c002a21f4a59588d201a3f0c
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user