diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-28 10:16:18 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-28 10:16:18 +0200 |
| commit | 73c6a37ecf0aac04711e5624455743b3493a7ef5 (patch) | |
| tree | ac58cce0dcd03ccac3f5f3e313a46ebe9d352b30 /internal/config/config_test.go | |
| parent | 1615abaacccdbb5002404a77270fd333ce8ad718 (diff) | |
Diffstat (limited to 'internal/config/config_test.go')
| -rw-r--r-- | internal/config/config_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go index db70457..30b59df 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -25,3 +25,25 @@ func TestValidate_ShowcaseStatsBranchesRejectsEmptyBranch(t *testing.T) { t.Fatalf("Validate() error = %q, want showcase_stats_branches context", err) } } + +func TestValidate_DescriptionSyncFieldsMustBePaired(t *testing.T) { + t.Parallel() + + cfg := &Config{ + Organizations: []Organization{ + { + Host: "ssh://git@example.com/repos", + BackupLocation: true, + DescriptionSyncHost: "root@example.com", + }, + }, + } + + err := cfg.Validate() + if err == nil { + t.Fatal("Validate() error = nil, want description sync validation error") + } + if !strings.Contains(err.Error(), "descriptionSyncHost") { + t.Fatalf("Validate() error = %q, want descriptionSyncHost context", err) + } +} |
