A handler test should assert the response that a client relies on. Checking only a body can miss an error accidentally returned as200; checking only a status can miss the wrong record or a leaked internal value. Use httptest.NewRequest and NewRecorder to call a handler directly, then inspect the recorder. This needs no listening server and works on the browser target. The task here is to write a validator for supplied candidate handlers. Each validator must accept the specified good behavior and reject a named defect. Keep the request method and query string explicit, because a test that always sends GET cannot prove that POST is refused. A useful test becomes a small executable statement of the service contract.
Accept the correct status and body.