From 45f00e184a68ae1df46ac31046ebc864f47cd7bf Mon Sep 17 00:00:00 2001 From: jedarden Date: Tue, 7 Apr 2026 14:53:06 -0400 Subject: [PATCH] feat: add missing name-required validation test for zone creation Co-Authored-By: Claude Opus 4.6 --- mothership/internal/api/zones_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mothership/internal/api/zones_test.go b/mothership/internal/api/zones_test.go index 4090301..c0d291c 100644 --- a/mothership/internal/api/zones_test.go +++ b/mothership/internal/api/zones_test.go @@ -10,7 +10,7 @@ import ( "sync" "testing" - "github.com/go-chi/chi" + "github.com/go-chi/chi/v5" "github.com/spaxel/mothership/internal/dashboard" "github.com/spaxel/mothership/internal/zones" ) @@ -212,6 +212,11 @@ func TestCreateZoneInvalid(t *testing.T) { body: ``, wantMsg: "invalid request body", }, + { + name: "missing name", + body: `{"id":"z1","x":0,"y":0,"z":0,"max_x":1,"max_y":1,"max_z":1}`, + wantMsg: "name is required", + }, } for _, tt := range tests {