add tests for after hooks