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

afterDestroy not called on failed destroy; tests added for other afterXXX handlers on error #249

merged 2 commits into from Mar 31, 2013


None yet
2 participants

scottnonnenberg commented Mar 31, 2013

Added functionality and tests for afterDestroy error cases.

Also added tests for prevention of afterCreate and afterUpdate in error cases, both already implemented.

A thought: what if all of these afterXXX handlers were still called on error, but the model's errors field had been set? That would allow anything set up in beforeCreate to be cleaned up in afterCreate, even if an error happened.

scottnonnenberg added some commits Mar 31, 2013

afterDestroy not called on adapter error
Similar to afterCreate and afterUpdate, we don't want to run the afterXXXX handlers if the delete failed according to the adapter.
tests only: no afterCreate/afterUpdate on errors
Added tests to ensure that the afterCreate/afterUpdate handlers are not run if the adapter returns an error.

anatoliychakkaev pushed a commit to anatoliychakkaev/jugglingdb that referenced this pull request Mar 31, 2013

@1602 1602 merged commit 5655e8f into 1602:master Mar 31, 2013

1 check passed

default The Travis build passed

vrcsix pushed a commit to minmb/jugglingdb that referenced this pull request May 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment