fixed tests

This commit is contained in:
Henry Oswald 2014-09-26 17:51:41 +01:00
parent 9891bc37d8
commit 1452eb4572
2 changed files with 10 additions and 4 deletions

View file

@ -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()

View file

@ -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