-
-
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
Snapshot record in any of Store mocks is empty #409
Comments
the => this.model is the model that you are mocking so it might be empty .. it just depends how you do the mock. so if you do
than this.model will be that user you are mocking whereas if you just do
this.model will be nil you are welcome to try and fix it. I just can't think of how to do a fix when you have no real model. |
I am using a model created with a
However, I think model instance is never passed to any of |
Ok, interesting .. I think you can fix that then. Can you make the PR with the fix ? ( and make a test for that ). |
I've been writing a test for a model with adapter that requires
snapshot.record
model instance in multipleurlFor*
methods. I couldn't make it work, becauserecord
was always empty.After looking at the source code, it seems like
this.model
is never set. Maybe I am overlooking something, but still would be glad to discuss and help to fix that.https://github.com/danielspaniel/ember-data-factory-guy/blob/5bd3a4b6122a5e172fac3492d9ed02351be8224a/addon/mocks/mock-store-request.js#L48
The text was updated successfully, but these errors were encountered: