Skip to content
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

mockQueryRecord calls adapter.urlForQueryRecord with undefined queryParams. #343

Closed
sly7-7 opened this issue May 15, 2018 · 2 comments
Closed

Comments

@sly7-7
Copy link

sly7-7 commented May 15, 2018

When doing

let user = make('user');
mockQueryRecord('user', { me: true}).returns({model: user});

It throws an exception in my adapter's urlForQueryRecord(query), with query being undefined.

I think it's because urlForQueryrecord is called during: https://github.com/danielspaniel/ember-data-factory-guy/blob/master/addon/mocks/mock-get-request.js#L14 but the queryParams attr is not yet initialized.

@danielspaniel
Copy link
Collaborator

let me write a test for that and see if i can fix it.

@danielspaniel
Copy link
Collaborator

this is fixed in https://github.com/danielspaniel/ember-data-factory-guy/releases/tag/v3.1.2
thanks for the issue .. was good one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants