orchestrate
Advanced tools
Comparing version 0.3.11 to 0.3.12
@@ -161,2 +161,3 @@ // Copyright 2013 Bowery Software, LLC | ||
* @param {string} query | ||
* @param {Object} options (Optional) | ||
* @return {Promise} | ||
@@ -166,2 +167,3 @@ */ | ||
assert(collection && query, 'Collection and query required.') | ||
options = options || {} | ||
options.query = query; | ||
@@ -168,0 +170,0 @@ return this._get(this.generateApiUrl([collection], options)) |
@@ -28,3 +28,3 @@ { | ||
}, | ||
"version": "0.3.11", | ||
"version": "0.3.12", | ||
"main": "index", | ||
@@ -31,0 +31,0 @@ "tags": [ |
@@ -25,2 +25,7 @@ // Copyright 2013 Bowery Software, LLC | ||
var fakeOrchestrate = nock('https://api.orchestrate.io/') | ||
.get('/v0/users?query=denver') | ||
.reply(200, { | ||
"results": [], | ||
"count": 0 | ||
}) | ||
.get('/v0/users?query=new%20york&limit=5&offset=2') | ||
@@ -141,2 +146,10 @@ .reply(200, { | ||
}) | ||
test('Calling search() directly on the client w/o options', function (done) { | ||
db.search('users', 'denver').then(function (res) { | ||
assert.equal(200, res.statusCode); | ||
assert.equal(res.body.count, 0); | ||
done() | ||
}) | ||
}) | ||
}) |
58131
1410