From 73c6a37ecf0aac04711e5624455743b3493a7ef5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 28 Mar 2026 10:16:18 +0200 Subject: feat(sync): auto-sync full backups and showcase cgit links --- internal/cli/sync_handlers_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/cli/sync_handlers_test.go (limited to 'internal/cli/sync_handlers_test.go') 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") + } +} -- cgit v1.2.3