mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fix unit scope error
This commit is contained in:
parent
d2b1243701
commit
7de103af68
1 changed files with 5 additions and 5 deletions
|
@ -79,7 +79,7 @@ describe "MongoAWS", ->
|
||||||
|
|
||||||
describe "handleBulk", ->
|
describe "handleBulk", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@ops = [{
|
@bulkOps = [{
|
||||||
_id: ObjectId()
|
_id: ObjectId()
|
||||||
doc_id: ObjectId()
|
doc_id: ObjectId()
|
||||||
project_id: ObjectId()
|
project_id: ObjectId()
|
||||||
|
@ -99,12 +99,12 @@ describe "MongoAWS", ->
|
||||||
execute: sinon.stub().callsArgWith(0, null, {})
|
execute: sinon.stub().callsArgWith(0, null, {})
|
||||||
@db.docHistory = {}
|
@db.docHistory = {}
|
||||||
@db.docHistory.initializeUnorderedBulkOp = sinon.stub().returns @bulk
|
@db.docHistory.initializeUnorderedBulkOp = sinon.stub().returns @bulk
|
||||||
@MongoAWS.handleBulk @ops, @callback
|
@MongoAWS.handleBulk @bulkOps, @callback
|
||||||
|
|
||||||
it "should call updateOne for each operation", ->
|
it "should call updateOne for each operation", ->
|
||||||
@bulk.find.calledWith({_id:@ops[0]._id}).should.equal true
|
@bulk.find.calledWith({_id:@bulkOps[0]._id}).should.equal true
|
||||||
@bulk.find.calledWith({_id:@ops[1]._id}).should.equal true
|
@bulk.find.calledWith({_id:@bulkOps[1]._id}).should.equal true
|
||||||
@bulk.find.calledWith({_id:@ops[2]._id}).should.equal true
|
@bulk.find.calledWith({_id:@bulkOps[2]._id}).should.equal true
|
||||||
|
|
||||||
it "should call the callback", ->
|
it "should call the callback", ->
|
||||||
@callback.calledWith(null).should.equal true
|
@callback.calledWith(null).should.equal true
|
||||||
|
|
Loading…
Reference in a new issue