MCPcopy Create free account
hub / github.com/angular-app/angular-app / mockupRestInterface

Function mockupRestInterface

server/test/mongo-strategy.js:22–30  ·  view source on GitHub ↗
(test, expectedUrl, expectedOptions, expectedEvent, expectedResult)

Source from the content-addressed store, hash-verified

20// This method uses the rewire technology to override the local variable "rest" in the test subject
21// so that we don't have to actually call out to the server - Yay!!
22function mockupRestInterface(test, expectedUrl, expectedOptions, expectedEvent, expectedResult) {
23 MongoDBStrategy.__set__('rest', {
24 get: function(url, options, callback) {
25 test.equal(url, expectedUrl, 'rest.get fn received invalid parameter');
26 test.deepEqual(options, expectedOptions, 'rest.get fn received invalid parameter');
27 callback(null, null, expectedResult);
28 }
29 });
30}
31
32var baseUrl = config.dbUrl + '/databases/' + config.dbName + '/collections/' + config.dbCollection + '/';
33

Callers 1

mongo-strategy.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected