summaryrefslogtreecommitdiff
path: root/internal/cli/sync_handlers_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-28 10:16:18 +0200
committerPaul Buetow <paul@buetow.org>2026-03-28 10:16:18 +0200
commit73c6a37ecf0aac04711e5624455743b3493a7ef5 (patch)
treeac58cce0dcd03ccac3f5f3e313a46ebe9d352b30 /internal/cli/sync_handlers_test.go
parent1615abaacccdbb5002404a77270fd333ce8ad718 (diff)
feat(sync): auto-sync full backups and showcase cgit linksv0.17.0main
Diffstat (limited to 'internal/cli/sync_handlers_test.go')
-rw-r--r--internal/cli/sync_handlers_test.go19
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")
+ }
+}