(t *testing.T)
| 1259 | } |
| 1260 | |
| 1261 | func TestConfigPostDupFolder(t *testing.T) { |
| 1262 | t.Parallel() |
| 1263 | |
| 1264 | cfg := bytes.NewBuffer([]byte(`{ |
| 1265 | "version": 15, |
| 1266 | "folders": [ |
| 1267 | {"id": "foo"}, |
| 1268 | {"id": "foo"} |
| 1269 | ] |
| 1270 | }`)) |
| 1271 | |
| 1272 | resp, err := testConfigPost(t, cfg) |
| 1273 | if err != nil { |
| 1274 | t.Fatal(err) |
| 1275 | } |
| 1276 | if resp.StatusCode != http.StatusBadRequest { |
| 1277 | t.Error("Expected 400 Bad Request, not", resp.Status) |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | func testConfigPost(t *testing.T, data io.Reader) (*http.Response, error) { |
| 1282 | t.Helper() |
nothing calls this directly
no test coverage detected