From 7de103af689e91e8f4baa9e547bd6d3059c7a695 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 2 Sep 2015 17:00:32 -0300 Subject: [PATCH] fix unit scope error --- .../test/unit/coffee/DocArchive/MongoAWS.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee b/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee index 180562dea7..4279ec0ab6 100644 --- a/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee +++ b/services/track-changes/test/unit/coffee/DocArchive/MongoAWS.coffee @@ -79,7 +79,7 @@ describe "MongoAWS", -> describe "handleBulk", -> beforeEach -> - @ops = [{ + @bulkOps = [{ _id: ObjectId() doc_id: ObjectId() project_id: ObjectId() @@ -99,12 +99,12 @@ describe "MongoAWS", -> execute: sinon.stub().callsArgWith(0, null, {}) @db.docHistory = {} @db.docHistory.initializeUnorderedBulkOp = sinon.stub().returns @bulk - @MongoAWS.handleBulk @ops, @callback + @MongoAWS.handleBulk @bulkOps, @callback it "should call updateOne for each operation", -> - @bulk.find.calledWith({_id:@ops[0]._id}).should.equal true - @bulk.find.calledWith({_id:@ops[1]._id}).should.equal true - @bulk.find.calledWith({_id:@ops[2]._id}).should.equal true + @bulk.find.calledWith({_id:@bulkOps[0]._id}).should.equal true + @bulk.find.calledWith({_id:@bulkOps[1]._id}).should.equal true + @bulk.find.calledWith({_id:@bulkOps[2]._id}).should.equal true it "should call the callback", -> @callback.calledWith(null).should.equal true