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

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

merged 2 commits into from
Mar 31, 2013


Copy link

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.

Similar to afterCreate and afterUpdate, we don't want to run the afterXXXX handlers if the delete failed according to the adapter.
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
Flygsand 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
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants