-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Transition an invalid created record to the deleted saved state when … #4293
Conversation
assert.equal(get(record, 'currentState.stateName'), 'root.deleted.saved'); | ||
assert.equal(get(store.peekAll('person'), 'length'), 0, 'The new person should be removed from the store'); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: any specific reason why this is not in tests/integration/records/delete-record-test.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I will move it.
|
||
assert.equal(get(record, 'currentState.stateName'), 'root.deleted.saved'); | ||
assert.equal(get(store.peekAll('person'), 'length'), 0, 'The new person should be removed from the store'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for destroyRecord
too? I think this fix should also work for #3688.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a test case for destroyRecord
.
Looks good 👍 Tiny nitpick: I would prefer using the adapter instead of |
…ed state when deleted. Closes emberjs#4289
@pangratz I've updated the test for this pr to not use the private |
Nice @bmac, feel free to merge once 🍏 |
…deleted.
Closes #4289