tests for hooks