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
672dd3de1b
commit
d7894c4ea7
17 changed files with 17 additions and 17 deletions
|
@ -22,7 +22,7 @@ describe 'putting a doc into memory', ()->
|
|||
|
||||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : ()->
|
||||
auth:->
|
||||
multi: ()->
|
||||
|
|
|
@ -13,7 +13,7 @@ describe 'Document Manager - getUpdatesLength ', ->
|
|||
|
||||
@llenStub = sinon.stub()
|
||||
@redisManager = SandboxedModule.require modulePath, requires:
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient:=>
|
||||
auth:->
|
||||
llen:@llenStub
|
||||
|
|
|
@ -12,7 +12,7 @@ describe "DispatchManager", ->
|
|||
"settings-sharelatex": @settings =
|
||||
redis:
|
||||
web: {}
|
||||
"redis": @redis = {}
|
||||
"redis-sharelatex": @redis = {}
|
||||
@callback = sinon.stub()
|
||||
|
||||
describe "each worker", ->
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'RedisManager - getDoc', ->
|
|||
@rclient.multi = () => @rclient
|
||||
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis": @redis =
|
||||
"redis-sharelatex": @redis =
|
||||
createClient: () => @rclient
|
||||
|
||||
@doc_id = "doc-id-123"
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'getting entire list of pending updates', ()->
|
|||
redisReturn = []
|
||||
|
||||
mocks =
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient: ()->
|
||||
auth:->
|
||||
multi: ()->
|
||||
|
|
|
@ -19,7 +19,7 @@ describe 'getting cound of docs from memory', ()->
|
|||
beforeEach (done)->
|
||||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : ()->
|
||||
auth:->
|
||||
smembers:(key, callback)->
|
||||
|
|
|
@ -19,7 +19,7 @@ describe 'Lock Manager - checking the lock', ()->
|
|||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : ()->
|
||||
auth:->
|
||||
multi: ->
|
||||
|
|
|
@ -14,7 +14,7 @@ describe 'LockManager - releasing the lock', ()->
|
|||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : ()->
|
||||
auth:->
|
||||
del:deleteStub
|
||||
|
|
|
@ -8,7 +8,7 @@ describe 'LockManager - getting the lock', ->
|
|||
beforeEach ->
|
||||
@LockManager = SandboxedModule.require modulePath, requires:
|
||||
"logger-sharelatex": log:->
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : () =>
|
||||
auth:->
|
||||
@callback = sinon.stub()
|
||||
|
|
|
@ -8,7 +8,7 @@ describe 'LockManager - trying the lock', ->
|
|||
beforeEach ->
|
||||
@LockManager = SandboxedModule.require modulePath, requires:
|
||||
"logger-sharelatex": log:->
|
||||
redis:
|
||||
"redis-sharelatex":
|
||||
createClient : () =>
|
||||
auth:->
|
||||
set: @set = sinon.stub()
|
||||
|
|
|
@ -10,7 +10,7 @@ describe "RedisManager.clearDocFromPendingUpdatesSet", ->
|
|||
@doc_id = "document-id"
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis" : createClient: () =>
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
@rclient = auth:->
|
||||
"logger-sharelatex": {}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe "RedisManager.getDocsWithPendingUpdates", ->
|
|||
beforeEach ->
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis" : createClient: () =>
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
@rclient = auth:->
|
||||
"logger-sharelatex": {}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.getPendingUpdatesForDoc", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis": createClient: () =>
|
||||
"redis-sharelatex": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -8,7 +8,7 @@ describe "RedisManager.getPreviousDocOpsTests", ->
|
|||
beforeEach ->
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis" : createClient: () =>
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
@rclient =
|
||||
auth: ->
|
||||
multi: => @rclient
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.pushDocOp", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis": createClient: () =>
|
||||
"redis-sharelatex": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.pushUncompressedHistoryOp", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis": createClient: () =>
|
||||
"redis-sharelatex": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -15,7 +15,7 @@ describe "ShareJsUpdateManager", ->
|
|||
class Model
|
||||
constructor: (@db) ->
|
||||
"./ShareJsDB" : @ShareJsDB = { mockDB: true }
|
||||
"redis" : createClient: () => @rclient = auth:->
|
||||
"redis-sharelatex" : createClient: () => @rclient = auth:->
|
||||
"logger-sharelatex": @logger = { log: sinon.stub() }
|
||||
globals:
|
||||
clearTimeout: @clearTimeout = sinon.stub()
|
||||
|
|
Loading…
Reference in a new issue