package services import ( "testing" "github.com/breakpilot/school-service/internal/models" ) func TestCreateTimetableSolutionRequest_NoBindingTags(t *testing.T) { // CreateSolution accepts an empty name; the binding tag is intentionally // absent. Both states (with + without name) must pass validation. tests := []struct { name string req models.CreateTimetableSolutionRequest wantErr bool }{ {"empty", models.CreateTimetableSolutionRequest{}, false}, {"with name", models.CreateTimetableSolutionRequest{Name: "Schuljahr 26/27 Test"}, false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if (validate.Struct(tt.req) != nil) != tt.wantErr { t.Errorf("unexpected validation outcome") } }) } }