mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 04:35:26 -05:00
Fix calling of updateDoc
This commit is contained in:
parent
f6e85c4140
commit
93883c7a03
2 changed files with 3 additions and 3 deletions
|
@ -123,7 +123,7 @@ module.exports = ProjectEntityHandler =
|
|||
doc = new Doc name: docName
|
||||
Project.putElement project._id, folder_id, doc, "doc", (err, result)=>
|
||||
return callback(err) if err?
|
||||
DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, 0, (err, modified, rev) ->
|
||||
DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, (err, modified, rev) ->
|
||||
return callback(err) if err?
|
||||
tpdsUpdateSender.addDoc {
|
||||
project_id: project._id,
|
||||
|
|
|
@ -305,7 +305,7 @@ describe 'ProjectEntityHandler', ->
|
|||
@ProjectModel.putElement = sinon.stub().callsArgWith(4, null, {path:{fileSystem:@path}})
|
||||
@callback = sinon.stub()
|
||||
@tpdsUpdateSender.addDoc = sinon.stub().callsArg(2)
|
||||
@DocstoreManager.updateDoc = sinon.stub().callsArgWith(4, null, true, 0)
|
||||
@DocstoreManager.updateDoc = sinon.stub().callsArgWith(3, null, true, 0)
|
||||
|
||||
@ProjectEntityHandler.addDoc project_id, folder_id, @name, @lines, @callback
|
||||
|
||||
|
@ -335,7 +335,7 @@ describe 'ProjectEntityHandler', ->
|
|||
|
||||
it "should send the doc lines to the doc store", ->
|
||||
@DocstoreManager.updateDoc
|
||||
.calledWith(project_id, @doc._id.toString(), @lines, 0)
|
||||
.calledWith(project_id, @doc._id.toString(), @lines)
|
||||
.should.equal true
|
||||
|
||||
describe 'adding file', ->
|
||||
|
|
Loading…
Reference in a new issue