Merge pull request #2182 from overleaf/ta-remove-user-stubs

Remove Usages of UserStub

GitOrigin-RevId: 6896d0d3594d12ffa06211838ae2274661c77f4f
This commit is contained in:
Simon Detheridge
2019-10-01 12:27:15 +01:00
committed by sharelatex
parent 962c5cc273
commit 2eb1f510c1
10 changed files with 31 additions and 127 deletions
@@ -97,8 +97,7 @@ describe('ProjectController', function() {
this.UserGetter = {
getUser: sinon
.stub()
.callsArgWith(2, null, { lastLoginIp: '192.170.18.2' }),
getUserOrUserStubById: sinon.stub().callsArgWith(2, null, {})
.callsArgWith(2, null, { lastLoginIp: '192.170.18.2' })
}
this.Modules = {
hooks: {
@@ -404,7 +403,7 @@ describe('ProjectController', function() {
this.UserModel.findById = (id, fields, callback) => {
callback(null, this.users[id])
}
this.UserGetter.getUserOrUserStubById = (id, fields, callback) => {
this.UserGetter.getUser = (id, fields, callback) => {
callback(null, this.users[id])
}