Merge pull request #3517 from overleaf/jpa-clear-clsi-persistance

[ClsiManager] clear the clsi persistence when clearing the cache

GitOrigin-RevId: 64035ec23b5a95ae5248f65777d5d8c8c088e192
This commit is contained in:
Jakob Ackermann
2021-01-08 03:04:41 +00:00
committed by Copybot
parent de646d3160
commit 00ba2d95c7
2 changed files with 33 additions and 14 deletions
@@ -8,6 +8,7 @@ describe('ClsiManager', function() {
beforeEach(function() {
this.jar = { cookie: 'stuff' }
this.ClsiCookieManager = {
clearServerId: sinon.stub().yields(),
getCookieJar: sinon.stub().callsArgWith(1, null, this.jar),
setServerId: sinon.stub().callsArgWith(2),
_getServerId: sinon.stub()
@@ -420,6 +421,12 @@ describe('ClsiManager', function() {
.should.equal(true)
})
it('should clear the clsi persistance', function() {
this.ClsiCookieManager.clearServerId
.calledWith(this.project_id)
.should.equal(true)
})
it('should call the callback', function() {
this.callback.called.should.equal(true)
})