Skip to content
quarry Artifact [6dfbd44604]
Login

Artifact [6dfbd44604]

Artifact 6dfbd44604193a1464e7cbb11e257b13ab283d11f8ada6c8f76d3fbc46fd1f2d:


package api

import (
	"testing"

	"craftdesign.group/quarry/internal/ops"
)

// A landing's number is an id the landing ops resolve, as landing.get
// does, so their input accepts it: "2" no longer fails "id must be >= 4"
// (jva, 2026-10-30).
func TestLandingOpsAcceptANumberAsTheID(t *testing.T) {
	for _, in := range []any{
		landingSayIn{Repo: "r", ID: "2"},
		landingAutoIn{Repo: "r", ID: "!12"},
		landingLandIn{Repo: "r", ID: "7"},
	} {
		if err := ops.Validate(in); err != nil {
			t.Errorf("FAIL: %T refuses a landing number: %v", in, err)
		}
	}
}