(t *testing.T)
| 824 | } |
| 825 | |
| 826 | func TestValidateConfig_EmptyPaths(t *testing.T) { |
| 827 | v := NewValidator(false) |
| 828 | config := &ConfigData{ |
| 829 | Scopes: map[string]ScopeConfig{ |
| 830 | "cli/graph": {Paths: []string{}}, // empty array |
| 831 | }, |
| 832 | TopKeys: []string{"scopes"}, |
| 833 | ConfigPath: ".taskmd.yaml", |
| 834 | } |
| 835 | |
| 836 | result := v.ValidateConfig(config) |
| 837 | |
| 838 | if result.Errors != 1 { |
| 839 | t.Errorf("Expected 1 error for empty paths, got %d", result.Errors) |
| 840 | } |
| 841 | |
| 842 | found := false |
| 843 | for _, issue := range result.Issues { |
| 844 | if issue.Level == LevelError && issue.Message == "scope 'cli/graph' has empty paths array" { |
| 845 | found = true |
| 846 | } |
| 847 | } |
| 848 | if !found { |
| 849 | t.Error("Expected empty paths error for scope cli/graph") |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | func TestValidateConfig_UnknownKeys(t *testing.T) { |
| 854 | v := NewValidator(false) |
nothing calls this directly
no test coverage detected