mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
fixed tests
This commit is contained in:
@@ -7,11 +7,15 @@ SandboxedModule = require('sandboxed-module')
|
||||
|
||||
describe "LockManager", ->
|
||||
beforeEach ->
|
||||
@Settings =
|
||||
redis:
|
||||
web:{}
|
||||
@LockManager = SandboxedModule.require modulePath, requires:
|
||||
"redis":
|
||||
"redis-sharelatex":
|
||||
createClient: () => @rclient =
|
||||
auth: sinon.stub()
|
||||
"settings-sharelatex": @Settings = {}
|
||||
"settings-sharelatex": @Settings
|
||||
|
||||
@key = "lock-key"
|
||||
@callback = sinon.stub()
|
||||
|
||||
|
||||
@@ -8,11 +8,13 @@ SandboxedModule = require('sandboxed-module')
|
||||
describe "RedisManager", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis" :
|
||||
"redis-sharelatex" :
|
||||
createClient: () => @rclient =
|
||||
auth: sinon.stub()
|
||||
multi: () => @rclient
|
||||
"settings-sharelatex": {}
|
||||
"settings-sharelatex":
|
||||
redis:
|
||||
web:{}
|
||||
@doc_id = "doc-id-123"
|
||||
@project_id = "project-id-123"
|
||||
@batchSize = 100
|
||||
|
||||
Reference in New Issue
Block a user