Merge pull request #5826 from overleaf/bg-use-resync-path
[document-updater] use paths from project structure update in resync GitOrigin-RevId: 6ed2a48da76553e2fe5d0d3ec8da535515a35110
This commit is contained in:
@@ -975,6 +975,7 @@ describe('DocumentManager', function () {
|
||||
describe('resyncDocContents', function () {
|
||||
describe('when doc is loaded in redis', function () {
|
||||
beforeEach(function () {
|
||||
this.pathnameFromProjectStructureUpdate = '/foo/bar.tex'
|
||||
this.RedisManager.getDoc = sinon
|
||||
.stub()
|
||||
.callsArgWith(
|
||||
@@ -990,6 +991,7 @@ describe('DocumentManager', function () {
|
||||
this.DocumentManager.resyncDocContents(
|
||||
this.project_id,
|
||||
this.doc_id,
|
||||
this.pathnameFromProjectStructureUpdate,
|
||||
this.callback
|
||||
)
|
||||
})
|
||||
@@ -1008,7 +1010,7 @@ describe('DocumentManager', function () {
|
||||
this.doc_id,
|
||||
this.lines,
|
||||
this.version,
|
||||
this.pathname,
|
||||
this.pathnameFromProjectStructureUpdate,
|
||||
this.callback
|
||||
)
|
||||
.should.equal(true)
|
||||
@@ -1017,6 +1019,7 @@ describe('DocumentManager', function () {
|
||||
|
||||
describe('when doc is not loaded in redis', function () {
|
||||
beforeEach(function () {
|
||||
this.pathnameFromProjectStructureUpdate = '/foo/bar.tex'
|
||||
this.RedisManager.getDoc = sinon.stub().callsArgWith(2, null)
|
||||
this.PersistenceManager.getDoc = sinon
|
||||
.stub()
|
||||
@@ -1032,6 +1035,7 @@ describe('DocumentManager', function () {
|
||||
this.DocumentManager.resyncDocContents(
|
||||
this.project_id,
|
||||
this.doc_id,
|
||||
this.pathnameFromProjectStructureUpdate,
|
||||
this.callback
|
||||
)
|
||||
})
|
||||
@@ -1056,7 +1060,7 @@ describe('DocumentManager', function () {
|
||||
this.doc_id,
|
||||
this.lines,
|
||||
this.version,
|
||||
this.pathname,
|
||||
this.pathnameFromProjectStructureUpdate,
|
||||
this.callback
|
||||
)
|
||||
.should.equal(true)
|
||||
|
||||
@@ -416,7 +416,7 @@ describe('HistoryManager', function () {
|
||||
|
||||
it('should queue doc content reyncs', function () {
|
||||
return this.DocumentManager.resyncDocContentsWithLock
|
||||
.calledWith(this.project_id, this.doc_id)
|
||||
.calledWith(this.project_id, this.docs[0].doc, this.docs[0].path)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user