Add tests for on_abort