fixed tests

This commit is contained in:
Henry Oswald 2014-09-26 17:49:31 +01:00
parent 9a97245c01
commit 0d056434e6
11 changed files with 11 additions and 11 deletions

View file

@ -15,7 +15,7 @@ describe "CompileManager", ->
@CompileManager = SandboxedModule.require modulePath, requires:
"settings-sharelatex": @settings =
redis: web: {host: "localhost", port: 42}
"redis":
"redis-sharelatex":
createClient: () => @rclient = { auth: () -> }
"../DocumentUpdater/DocumentUpdaterHandler": @DocumentUpdaterHandler = {}
"../Project/ProjectRootDocManager": @ProjectRootDocManager = {}

View file

@ -34,7 +34,7 @@ describe "ConnectedUsersManager", ->
@ConnectedUsersManager = SandboxedModule.require modulePath, requires:
"settings-sharelatex":@settings
"logger-sharelatex": log:->
"redis": createClient:=>
"redis-sharelatex": createClient:=>
return @rClient
@client_id = "32132132"
@project_id = "dskjh2u21321"

View file

@ -31,7 +31,7 @@ describe 'Flushing documents :', ->
'../Project/ProjectEntityHandler':@projectEntityHandler
"../../models/Project": Project: @Project={}
'../../Features/Project/ProjectLocator':{}
'redis' : createClient: () => @rclient
'redis-sharelatex' : createClient: () => @rclient
describe 'queueChange', ->
beforeEach ->

View file

@ -10,7 +10,7 @@ describe "getNumberOfDocsInMemory", ->
@noOfDocs = 42
@callback = sinon.stub()
@DocumentUpdateHandler = SandboxedModule.require modulePath, requires:
"redis" :
"redis-sharelatex" :
createClient: () ->
auth:->
"soa-req-id": null

View file

@ -10,7 +10,7 @@ describe 'DropboxWebhookHandler', ->
@DropboxWebhookHandler = SandboxedModule.require modulePath, requires:
"../../models/User": User: @User = {}
"../ThirdPartyDataStore/TpdsUpdateSender": @TpdsUpdateSender = {}
"redis":
"redis-sharelatex":
createClient: () => @rclient =
auth: sinon.stub()
'settings-sharelatex': redis: web: {}

View file

@ -75,7 +75,7 @@ describe "EditorController", ->
"../../infrastructure/Metrics": @Metrics = { inc: sinon.stub() }
"../TrackChanges/TrackChangesManager": @TrackChangesManager = {}
"../ConnectedUsers/ConnectedUsersManager":@ConnectedUsersManager
'redis':createClient:-> auth:->
'redis-sharelatex':createClient:-> auth:->
"logger-sharelatex": @logger =
log: sinon.stub()
err: sinon.stub()

View file

@ -6,7 +6,7 @@ modulePath = require('path').join __dirname, '../../../../app/js/Features/Editor
describe "EditorRealTimeController", ->
beforeEach ->
@EditorRealTimeController = SandboxedModule.require modulePath, requires:
"redis":
"redis-sharelatex":
createClient: () ->
auth:->
"../../infrastructure/Server" : io: @io = {}

View file

@ -17,7 +17,7 @@ describe "EditorUpdatesController", ->
"../DocumentUpdater/DocumentUpdaterHandler" : @DocumentUpdaterHandler = {}
"../../infrastructure/Metrics" : @metrics = { set: sinon.stub(), inc: sinon.stub() }
"../../infrastructure/Server" : io: @io = {}
"redis" :
"redis-sharelatex" :
createClient: ()=>
@rclient = {auth:->}

View file

@ -23,7 +23,7 @@ describe "PasswordResetTokenHandler", ->
exec:sinon.stub()
self = @
@PasswordResetTokenHandler = SandboxedModule.require modulePath, requires:
"redis" :
"redis-sharelatex" :
createClient: =>
auth:->
multi: -> return self.redisMulti

View file

@ -25,7 +25,7 @@ describe "LoginRateLimiter", ->
exec: @execStub
@LoginRateLimiter = SandboxedModule.require modulePath, requires:
'redis' : createClient: () => @rclient
'redis-sharelatex' : createClient: () => @rclient
describe "processLoginRequest", ->

View file

@ -27,7 +27,7 @@ describe "FileStoreHandler", ->
@limiter = SandboxedModule.require modulePath, requires:
"settings-sharelatex":@settings
"logger-sharelatex" : @logger = {log:sinon.stub(), err:sinon.stub()}
"redis": @redis
"redis-sharelatex": @redis
"redback": use: => @redback
@endpointName = "compiles"