-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handleFindQuery doesn't make use of query parameters #126
Comments
Good find @mdentremont ... I might have to change this method a teeny bit to make this work since ember-data v2.0.0 does not use findQuery anymore, but query and queryRecord. |
@mdentremont ... Can you tell me any good reason not to change the api from this: testHelper.handleQuery('user', ['name', 'age'], users);
```
To this:
```js
testHelper.handleQuery('user', {name:'Bob', age: 10}, users); For a query like this: store.query('user', {name:'Bob', age: 10}}); I am wondering why I ever did the first way ( ['name', 'age'] .. array of query param names ) in the first place, rather than the object of query params that are normally passed in to the query method. Anyway .. unless you can think of any good reason to keep the ['name', 'age'] style query args .. I am changing that to object args like ( {name:'Bob', age: 10}} ) and changing handleFindQuery to handleQuery |
@danielspaniel 100% agree, I like the new way better than the array. |
Yeah, me too .. what was I thinking? |
😝 |
ok @mdentremont .. give v1.13.10 a spin, let me know if this fixes things. |
let me know or open this again if you still have issue |
I was trying to setup the following mocks:
Regardless of what I pass in for query parameters to
handleFindQuery
, what ends up getting returned is whatever I passed to the first call ofhandleFindQuery
.Looking at the unit tests for this project, it looks like this would be caused if we setup some "failure" tests. IE: call
handleFindQuery
with query parameter X, and then callfindQuery
with query parameter Y, and assert that our mock was not used.The text was updated successfully, but these errors were encountered: