Fixes test that checks status code of hook creation