refactor remaining tests to use httptest