checking request headers instead of response
fixing errors in tests