diff --git a/workspace-server/internal/handlers/org_helpers_security_test.go b/workspace-server/internal/handlers/org_helpers_security_test.go index 6fc4f83e..2adbc22f 100644 --- a/workspace-server/internal/handlers/org_helpers_security_test.go +++ b/workspace-server/internal/handlers/org_helpers_security_test.go @@ -138,23 +138,6 @@ func TestResolveInsideRoot_SiblingNotEscaped(t *testing.T) { // ── isSafeRoleName ──────────────────────────────────────────────────────────── -func TestIsSafeRoleName_Valid(t *testing.T) { - valid := []string{ - "backend", - "Frontend-Engineer", - "research_lead", - "devOps123", - "a", - "A", - "team_42-leads", - } - for _, name := range valid { - if !isSafeRoleName(name) { - t.Errorf("isSafeRoleName(%q): expected true, got false", name) - } - } -} - func TestIsSafeRoleName_Empty(t *testing.T) { if isSafeRoleName("") { t.Error("isSafeRoleName(\"\"): expected false, got true") @@ -268,33 +251,6 @@ func TestMergeCategoryRouting_WsOverrideDropsDefault(t *testing.T) { } } -func TestMergeCategoryRouting_EmptyListDropsCategory(t *testing.T) { - defaultRouting := map[string][]string{ - "security": {"Backend Engineer"}, - "ui": {"Frontend Engineer"}, - } - wsRouting := map[string][]string{ - "security": {}, // empty list = opt out - } - got := mergeCategoryRouting(defaultRouting, wsRouting) - if _, exists := got["security"]; exists { - t.Error("empty ws list should delete the category from output") - } - if len(got["ui"]) != 1 { - t.Errorf("ui should still exist: got %v", got["ui"]) - } -} - -func TestMergeCategoryRouting_EmptyKeySkipped(t *testing.T) { - defaultRouting := map[string][]string{ - "": {"Backend Engineer"}, - } - got := mergeCategoryRouting(defaultRouting, nil) - if _, exists := got[""]; exists { - t.Error("empty key should be skipped") - } -} - func TestMergeCategoryRouting_EmptyRolesInDefaultSkipped(t *testing.T) { defaultRouting := map[string][]string{ "security": {},