mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
check project structure version in unit tests
This commit is contained in:
parent
e6020e2e9b
commit
af494dedf2
1 changed files with 6 additions and 4 deletions
|
@ -390,6 +390,8 @@ describe 'DocumentUpdaterHandler', ->
|
||||||
describe "updateProjectStructure ", ->
|
describe "updateProjectStructure ", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@user_id = 1234
|
@user_id = 1234
|
||||||
|
@version = 999
|
||||||
|
@Project.findOne = sinon.stub().callsArgWith(2,null, {_id: @project_id, version:@version})
|
||||||
|
|
||||||
describe "with project history disabled", ->
|
describe "with project history disabled", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
@ -434,7 +436,7 @@ describe 'DocumentUpdaterHandler', ->
|
||||||
|
|
||||||
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
||||||
@request.post
|
@request.post
|
||||||
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id})
|
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id, version:@version})
|
||||||
.should.equal true
|
.should.equal true
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
@ -454,7 +456,7 @@ describe 'DocumentUpdaterHandler', ->
|
||||||
|
|
||||||
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
||||||
@request.post
|
@request.post
|
||||||
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id})
|
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id, version:@version})
|
||||||
.should.equal true
|
.should.equal true
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
@ -474,7 +476,7 @@ describe 'DocumentUpdaterHandler', ->
|
||||||
|
|
||||||
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
||||||
@request.post
|
@request.post
|
||||||
.calledWith(url: @url, json: {docUpdates: [], fileUpdates, userId: @user_id})
|
.calledWith(url: @url, json: {docUpdates: [], fileUpdates, userId: @user_id, version:@version})
|
||||||
.should.equal true
|
.should.equal true
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
@ -493,7 +495,7 @@ describe 'DocumentUpdaterHandler', ->
|
||||||
|
|
||||||
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
@handler.updateProjectStructure @project_id, @user_id, @changes, () =>
|
||||||
@request.post
|
@request.post
|
||||||
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id})
|
.calledWith(url: @url, json: {docUpdates, fileUpdates: [], userId: @user_id, version:@version})
|
||||||
.should.equal true
|
.should.equal true
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue