(t *testing.T, ts *httptest.Server)
| 60 | } |
| 61 | |
| 62 | func get(t *testing.T, ts *httptest.Server) (resp *http.Response, body []byte) { |
| 63 | resp, err := http.Get(ts.URL) |
| 64 | if err != nil { |
| 65 | t.Fatal(err) |
| 66 | } |
| 67 | |
| 68 | body, err = io.ReadAll(resp.Body) |
| 69 | if err != nil { |
| 70 | t.Fatal(err) |
| 71 | } |
| 72 | return |
| 73 | } |
| 74 | |
| 75 | func TestRigidHandle(t *testing.T) { |
| 76 | ts := httptest.NewServer(HTTPHandler{Handler: HandlerFunc(simpleHandle), Methods: []string{"POST"}}) |
no test coverage detected