(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestDeleteStandard(t *testing.T) { |
| 118 | requestAddr := runGoHTTPServer() |
| 119 | |
| 120 | req := New() |
| 121 | req.SetURL(requestAddr + "/delete") |
| 122 | req.SetHeaders(map[string]string{ |
| 123 | "Authorization": "Bearer token", |
| 124 | }) |
| 125 | req.SetParams(KV{ |
| 126 | "uid": 123, |
| 127 | }) |
| 128 | |
| 129 | resp, err := req.DELETE() |
| 130 | if err != nil { |
| 131 | t.Fatal(err) |
| 132 | } |
| 133 | |
| 134 | result := &StdResult{} |
| 135 | err = resp.BindJSON(result) |
| 136 | if err != nil { |
| 137 | t.Fatal(err) |
| 138 | } |
| 139 | |
| 140 | t.Logf("%+v", result) |
| 141 | } |
| 142 | |
| 143 | func TestPostStandard(t *testing.T) { |
| 144 | requestAddr := runGoHTTPServer() |
nothing calls this directly
no test coverage detected