mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fixed tests
This commit is contained in:
parent
9a97245c01
commit
0d056434e6
11 changed files with 11 additions and 11 deletions
|
@ -15,7 +15,7 @@ describe "CompileManager", ->
|
|||
@CompileManager = SandboxedModule.require modulePath, requires:
|
||||
"settings-sharelatex": @settings =
|
||||
redis: web: {host: "localhost", port: 42}
|
||||
"redis":
|
||||
"redis-sharelatex":
|
||||
createClient: () => @rclient = { auth: () -> }
|
||||
"../DocumentUpdater/DocumentUpdaterHandler": @DocumentUpdaterHandler = {}
|
||||
"../Project/ProjectRootDocManager": @ProjectRootDocManager = {}
|
||||
|
|
|
@ -34,7 +34,7 @@ describe "ConnectedUsersManager", ->
|
|||
@ConnectedUsersManager = SandboxedModule.require modulePath, requires:
|
||||
"settings-sharelatex":@settings
|
||||
"logger-sharelatex": log:->
|
||||
"redis": createClient:=>
|
||||
"redis-sharelatex": createClient:=>
|
||||
return @rClient
|
||||
@client_id = "32132132"
|
||||
@project_id = "dskjh2u21321"
|
||||
|
|
|
@ -31,7 +31,7 @@ describe 'Flushing documents :', ->
|
|||
'../Project/ProjectEntityHandler':@projectEntityHandler
|
||||
"../../models/Project": Project: @Project={}
|
||||
'../../Features/Project/ProjectLocator':{}
|
||||
'redis' : createClient: () => @rclient
|
||||
'redis-sharelatex' : createClient: () => @rclient
|
||||
|
||||
describe 'queueChange', ->
|
||||
beforeEach ->
|
||||
|
|
|
@ -10,7 +10,7 @@ describe "getNumberOfDocsInMemory", ->
|
|||
@noOfDocs = 42
|
||||
@callback = sinon.stub()
|
||||
@DocumentUpdateHandler = SandboxedModule.require modulePath, requires:
|
||||
"redis" :
|
||||
"redis-sharelatex" :
|
||||
createClient: () ->
|
||||
auth:->
|
||||
"soa-req-id": null
|
||||
|
|
|
@ -10,7 +10,7 @@ describe 'DropboxWebhookHandler', ->
|
|||
@DropboxWebhookHandler = SandboxedModule.require modulePath, requires:
|
||||
"../../models/User": User: @User = {}
|
||||
"../ThirdPartyDataStore/TpdsUpdateSender": @TpdsUpdateSender = {}
|
||||
"redis":
|
||||
"redis-sharelatex":
|
||||
createClient: () => @rclient =
|
||||
auth: sinon.stub()
|
||||
'settings-sharelatex': redis: web: {}
|
||||
|
|
|
@ -75,7 +75,7 @@ describe "EditorController", ->
|
|||
"../../infrastructure/Metrics": @Metrics = { inc: sinon.stub() }
|
||||
"../TrackChanges/TrackChangesManager": @TrackChangesManager = {}
|
||||
"../ConnectedUsers/ConnectedUsersManager":@ConnectedUsersManager
|
||||
'redis':createClient:-> auth:->
|
||||
'redis-sharelatex':createClient:-> auth:->
|
||||
"logger-sharelatex": @logger =
|
||||
log: sinon.stub()
|
||||
err: sinon.stub()
|
||||
|
|
|
@ -6,7 +6,7 @@ modulePath = require('path').join __dirname, '../../../../app/js/Features/Editor
|
|||
describe "EditorRealTimeController", ->
|
||||
beforeEach ->
|
||||
@EditorRealTimeController = SandboxedModule.require modulePath, requires:
|
||||
"redis":
|
||||
"redis-sharelatex":
|
||||
createClient: () ->
|
||||
auth:->
|
||||
"../../infrastructure/Server" : io: @io = {}
|
||||
|
|
|
@ -17,7 +17,7 @@ describe "EditorUpdatesController", ->
|
|||
"../DocumentUpdater/DocumentUpdaterHandler" : @DocumentUpdaterHandler = {}
|
||||
"../../infrastructure/Metrics" : @metrics = { set: sinon.stub(), inc: sinon.stub() }
|
||||
"../../infrastructure/Server" : io: @io = {}
|
||||
"redis" :
|
||||
"redis-sharelatex" :
|
||||
createClient: ()=>
|
||||
@rclient = {auth:->}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ describe "PasswordResetTokenHandler", ->
|
|||
exec:sinon.stub()
|
||||
self = @
|
||||
@PasswordResetTokenHandler = SandboxedModule.require modulePath, requires:
|
||||
"redis" :
|
||||
"redis-sharelatex" :
|
||||
createClient: =>
|
||||
auth:->
|
||||
multi: -> return self.redisMulti
|
||||
|
|
|
@ -25,7 +25,7 @@ describe "LoginRateLimiter", ->
|
|||
exec: @execStub
|
||||
|
||||
@LoginRateLimiter = SandboxedModule.require modulePath, requires:
|
||||
'redis' : createClient: () => @rclient
|
||||
'redis-sharelatex' : createClient: () => @rclient
|
||||
|
||||
describe "processLoginRequest", ->
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ describe "FileStoreHandler", ->
|
|||
@limiter = SandboxedModule.require modulePath, requires:
|
||||
"settings-sharelatex":@settings
|
||||
"logger-sharelatex" : @logger = {log:sinon.stub(), err:sinon.stub()}
|
||||
"redis": @redis
|
||||
"redis-sharelatex": @redis
|
||||
"redback": use: => @redback
|
||||
|
||||
@endpointName = "compiles"
|
||||
|
|
Loading…
Reference in a new issue