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/cli/sync_handlers_test.go | |
| parent | 1615abaacccdbb5002404a77270fd333ce8ad718 (diff) | |
Diffstat (limited to 'internal/cli/sync_handlers_test.go')
| -rw-r--r-- | internal/cli/sync_handlers_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/cli/sync_handlers_test.go b/internal/cli/sync_handlers_test.go new file mode 100644 index 0000000..2eaad67 --- /dev/null +++ b/internal/cli/sync_handlers_test.go @@ -0,0 +1,19 @@ +package cli + +import "testing" + +func TestShouldEnableBackupSync_FullSyncImplicitlyEnablesBackup(t *testing.T) { + t.Parallel() + + if !shouldEnableBackupSync(&Flags{FullSync: true}) { + t.Fatal("expected full sync to enable backup sync implicitly") + } + + if !shouldEnableBackupSync(&Flags{Backup: true}) { + t.Fatal("expected explicit --backup to enable backup sync") + } + + if shouldEnableBackupSync(&Flags{}) { + t.Fatal("did not expect backup sync to be enabled by default") + } +} |
