fixed tests

This commit is contained in:
Henry Oswald 2014-09-26 17:57:15 +01:00
parent 672dd3de1b
commit d7894c4ea7
17 changed files with 17 additions and 17 deletions

View file

@ -22,7 +22,7 @@ describe 'putting a doc into memory', ()->
mocks =
"logger-sharelatex": log:->
redis:
"redis-sharelatex":
createClient : ()->
auth:->
multi: ()->

View file

@ -13,7 +13,7 @@ describe 'Document Manager - getUpdatesLength ', ->
@llenStub = sinon.stub()
@redisManager = SandboxedModule.require modulePath, requires:
redis:
"redis-sharelatex":
createClient:=>
auth:->
llen:@llenStub

View file

@ -12,7 +12,7 @@ describe "DispatchManager", ->
"settings-sharelatex": @settings =
redis:
web: {}
"redis": @redis = {}
"redis-sharelatex": @redis = {}
@callback = sinon.stub()
describe "each worker", ->

View file

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

View file

@ -18,7 +18,7 @@ describe 'getting entire list of pending updates', ()->
redisReturn = []
mocks =
redis:
"redis-sharelatex":
createClient: ()->
auth:->
multi: ()->

View file

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

View file

@ -19,7 +19,7 @@ describe 'Lock Manager - checking the lock', ()->
mocks =
"logger-sharelatex": log:->
redis:
"redis-sharelatex":
createClient : ()->
auth:->
multi: ->

View file

@ -14,7 +14,7 @@ describe 'LockManager - releasing the lock', ()->
mocks =
"logger-sharelatex": log:->
redis:
"redis-sharelatex":
createClient : ()->
auth:->
del:deleteStub

View file

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

View file

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

View file

@ -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": {}

View file

@ -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": {}

View file

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

View file

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

View file

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

View file

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

View file

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