(t *testing.T)
| 201 | } |
| 202 | |
| 203 | func TestInitConfigNoConfigFile(t *testing.T) { |
| 204 | // No config file — should behave exactly as before |
| 205 | c, err := buildTestConfig([]string{"-service", "github"}) |
| 206 | if err != nil { |
| 207 | t.Fatalf("Expected no error, got: %v", err) |
| 208 | } |
| 209 | |
| 210 | if c.service != "github" { |
| 211 | t.Errorf("Expected service 'github', got: %v", c.service) |
| 212 | } |
| 213 | // Defaults should be the flag defaults |
| 214 | if c.ignoreFork { |
| 215 | t.Error("Expected ignore_fork to be false by default") |
| 216 | } |
| 217 | if c.githubRepoType != "all" { |
| 218 | t.Errorf("Expected github.repoType 'all', got: %v", c.githubRepoType) |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | func TestHandleValidateConfigInvalidRepoType(t *testing.T) { |
| 223 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected