Skip to content

Instantly share code, notes, and snippets.

@david-martin
Created January 26, 2017 16:52
Show Gist options
  • Save david-martin/2a042f583b892da823e0f4c945f5f889 to your computer and use it in GitHub Desktop.
Save david-martin/2a042f583b892da823e0f4c945f5f889 to your computer and use it in GitHub Desktop.
diff --git a/test/test_sync-srv.js b/test/test_sync-srv.js
index 20dffec..e6ba7db 100644
--- a/test/test_sync-srv.js
+++ b/test/test_sync-srv.js
@@ -18,13 +18,19 @@ module.exports = {
protocol: 'https'
}
};
- var mongoStub = sinon.stub();
+ var mongoStub = {
+ create: sinon.stub.callsArgWith(2, null, {}),
+ list: sinon.stub.callsArgWith(2, null, {}),
+ remove: sinon.stub.callsArgWith(2, null, {}),
+ setFHDB: sinon.stub(),
+ setConnectionUrl: sinon.stub()
+ };
var dbStub = sinon.stub().returns(function(option, cb) {
cb(null, "dummy:connectionstring");
});
sync = proxyquire("../lib/sync-srv.js", {
- './sync-UpdatesModule_mongo.js': mongoStub,
+ './sync-UpdatesModel_mongo.js': mongoStub,
'./db': dbStub
})(config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment