|
@@ -105,13 +105,18 @@ describe "ClsiCookieManager", ->
|
|
|
serverId.should.equal "clsi-8"
|
|
serverId.should.equal "clsi-8"
|
|
|
done()
|
|
done()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
it "should not set the server id if clsiCookies are not enabled", (done)->
|
|
it "should not set the server id if clsiCookies are not enabled", (done)->
|
|
|
delete @settings.clsiCookie.key
|
|
delete @settings.clsiCookie.key
|
|
|
@ClsiCookieManager = SandboxedModule.require modulePath, requires:@requires
|
|
@ClsiCookieManager = SandboxedModule.require modulePath, requires:@requires
|
|
|
@ClsiCookieManager.setServerId @project_id, @response, (err, serverId)=>
|
|
@ClsiCookieManager.setServerId @project_id, @response, (err, serverId)=>
|
|
|
@redisMulti.exec.called.should.equal false
|
|
@redisMulti.exec.called.should.equal false
|
|
|
done()
|
|
done()
|
|
|
|
|
+
|
|
|
|
|
+ it "should not set the server id there is no server id in the response", (done)->
|
|
|
|
|
+ @ClsiCookieManager._parseServerIdFromResponse = sinon.stub().returns(null)
|
|
|
|
|
+ @ClsiCookieManager.setServerId @project_id, @response, (err, serverId)=>
|
|
|
|
|
+ @redisMulti.exec.called.should.equal false
|
|
|
|
|
+ done()
|
|
|
|
|
|
|
|
it "should also set in the secondary if secondary redis is enabled", (done) ->
|
|
it "should also set in the secondary if secondary redis is enabled", (done) ->
|
|
|
@redisSecondaryMulti =
|
|
@redisSecondaryMulti =
|