-
-
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
[BUGFIX] destroyRecord should also unload #5455
[BUGFIX] destroyRecord should also unload #5455
Conversation
|
||
env.adapter.deleteRecord = function() { | ||
return EmberPromise.resolve({ | ||
data: { |
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.
it's important to note that no matter what this value is, as long as it is not undefined
, the test seems to still fail.
bb70fbb
to
35cc95f
Compare
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.
After discussing with the team, we resolved that destroyRecord should indeed complete the process.
However, #5472 surfaces inadequate test coverage and bugs, we will need to fast-follow with a fix for such.
35cc95f
to
8f93c0d
Compare
75e5638
to
1b84fb5
Compare
8bde815
to
f40c60d
Compare
018568d
to
6c51fe4
Compare
It seems common for APIs to return a paylaod when deleting a record. Although there is a test for when `undefined` is returned from `deleteRecord` in the adapter here: https://github.com/emberjs/data/blob/master/tests/integration/records/delete-record-test.js#L87 There are currently no tests showing what happens when you return a payload. It seems like the correct behavior for destroyRecord should be `deleteRecord` + `save` + `unloadRecord`.
…Record + save refactor delete-record-test to new style add assertion messages
30f3ee3
to
f2464c1
Compare
Any progress here? |
Closing in favor of #7258 |
It seems common for APIs to return a paylaod when deleting a record.
Although there is a test for when
undefined
is returned fromdeleteRecord
in the adapter here: https://github.com/emberjs/data/blob/master/tests/integration/records/delete-record-test.js#L87There are currently no tests showing what happens when you return a
payload. It seems like the correct behavior for destroyRecord should be
deleteRecord
+save
+unloadRecord
.