summaryrefslogtreecommitdiff
path: root/internal/cli/sync_handlers_test.go
diff options
context:
space:
mode:
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")
+ }
+}