feat: add missing name-required validation test for zone creation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
336972a326
commit
45f00e184a
1 changed files with 6 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue