diff --git a/internal/api/seed_lots_test.go b/internal/api/seed_lots_test.go index 332a353..55735a6 100644 --- a/internal/api/seed_lots_test.go +++ b/internal/api/seed_lots_test.go @@ -163,7 +163,7 @@ func TestSeedLotRemainingIsDerivedAPI(t *testing.T) { oid := int64(decodeMap(t, w.Body.Bytes())["id"].(float64)) // Plant 12 of them against the lot. - w = doJSON(t, r, http.MethodPost, objectPath(oid)+"/plantings", map[string]any{ + w = doJSON(t, r, http.MethodPost, objectPlantingsPath(oid), map[string]any{ "plantId": plantID, "xCm": 0, "yCm": 0, "radiusCm": 20, "count": 12, "seedLotId": lotID, }, cookie) if w.Code != http.StatusCreated { @@ -183,7 +183,7 @@ func TestSeedLotRemainingIsDerivedAPI(t *testing.T) { // NEGATIVE. That's deliberate — the number is a derived truth about what // you've committed, not a floor clamped at zero, and "you've planted more than // you bought" is exactly the signal a gardener wants rather than a hidden -7. - w = doJSON(t, r, http.MethodPost, objectPath(oid)+"/plantings", map[string]any{ + w = doJSON(t, r, http.MethodPost, objectPlantingsPath(oid), map[string]any{ "plantId": plantID, "xCm": 40, "yCm": 40, "radiusCm": 20, "count": 45, "seedLotId": lotID, }, cookie) if w.Code != http.StatusCreated {