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", -> describe "LockManager", ->
beforeEach -> beforeEach ->
@Settings =
redis:
web:{}
@LockManager = SandboxedModule.require modulePath, requires: @LockManager = SandboxedModule.require modulePath, requires:
"redis": "redis-sharelatex":
createClient: () => @rclient = createClient: () => @rclient =
auth: sinon.stub() auth: sinon.stub()
"settings-sharelatex": @Settings = {} "settings-sharelatex": @Settings
@key = "lock-key" @key = "lock-key"
@callback = sinon.stub() @callback = sinon.stub()

View file

@ -8,11 +8,13 @@ SandboxedModule = require('sandboxed-module')
describe "RedisManager", -> describe "RedisManager", ->
beforeEach -> beforeEach ->
@RedisManager = SandboxedModule.require modulePath, requires: @RedisManager = SandboxedModule.require modulePath, requires:
"redis" : "redis-sharelatex" :
createClient: () => @rclient = createClient: () => @rclient =
auth: sinon.stub() auth: sinon.stub()
multi: () => @rclient multi: () => @rclient
"settings-sharelatex": {} "settings-sharelatex":
redis:
web:{}
@doc_id = "doc-id-123" @doc_id = "doc-id-123"
@project_id = "project-id-123" @project_id = "project-id-123"
@batchSize = 100 @batchSize = 100