(t *testing.T)
| 1236 | } |
| 1237 | |
| 1238 | func TestConfigPostOK(t *testing.T) { |
| 1239 | t.Parallel() |
| 1240 | |
| 1241 | cfg := bytes.NewBuffer([]byte(`{ |
| 1242 | "version": 15, |
| 1243 | "folders": [ |
| 1244 | { |
| 1245 | "id": "foo", |
| 1246 | "path": "TestConfigPostOK" |
| 1247 | } |
| 1248 | ] |
| 1249 | }`)) |
| 1250 | |
| 1251 | resp, err := testConfigPost(t, cfg) |
| 1252 | if err != nil { |
| 1253 | t.Fatal(err) |
| 1254 | } |
| 1255 | if resp.StatusCode != http.StatusOK { |
| 1256 | t.Error("Expected 200 OK, not", resp.Status) |
| 1257 | } |
| 1258 | os.RemoveAll("TestConfigPostOK") |
| 1259 | } |
| 1260 | |
| 1261 | func TestConfigPostDupFolder(t *testing.T) { |
| 1262 | t.Parallel() |
nothing calls this directly
no test coverage detected