Skip to content

Commit

Permalink
changed selector to filter
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardTolosajr committed Sep 4, 2016
1 parent 80a52e1 commit 80ae0df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon/adapters/pouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default DS.RESTAdapter.extend({
var db = this.get('db');

var queryParams = {
selector: this._buildSelector(query.selector)
selector: this._buildSelector(query.filter)
};

if (!Ember.isEmpty(query.sort)) {
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/adapters/pouch-basics-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test('can query with sort', function (assert) {
});
}).then(() => {
return this.store().query('smasher', {
selector: {name: {$gt: ''}},
filter: {name: {$gt: ''}},
sort: ['name']
});
}).then((found) => {
Expand Down Expand Up @@ -108,7 +108,7 @@ test('can query multi-field queries', function (assert) {
});
}).then(() => {
return this.store().query('smasher', {
selector: {series: 'Mario' },
filter: {series: 'Mario' },
sort: [
{series: 'desc'},
{debut: 'desc'}]
Expand Down Expand Up @@ -143,7 +143,7 @@ test('can query one record', function (assert) {
});
}).then(() => {
return this.store().queryRecord('taco-soup', {
selector: {flavor: 'al pastor' }
filter: {flavor: 'al pastor' }
});
}).then((found) => {
assert.equal(found.get('flavor'), 'al pastor',
Expand Down Expand Up @@ -172,7 +172,7 @@ test('can query one associated records', function (assert) {
});
}).then(() => {
return this.store().queryRecord('taco-soup', {
selector: {flavor: 'al pastor' }});
filter: {flavor: 'al pastor' }});
}).then((found) => {
assert.equal(found.get('flavor'), 'al pastor',
'should have found the requested item');
Expand Down

0 comments on commit 80ae0df

Please sign in to comment.