aboutsummaryrefslogtreecommitdiff
path: root/.ai/scripts/tests/drill-deck-sync.bats
diff options
context:
space:
mode:
Diffstat (limited to '.ai/scripts/tests/drill-deck-sync.bats')
-rw-r--r--.ai/scripts/tests/drill-deck-sync.bats38
1 files changed, 0 insertions, 38 deletions
diff --git a/.ai/scripts/tests/drill-deck-sync.bats b/.ai/scripts/tests/drill-deck-sync.bats
deleted file mode 100644
index e141cab..0000000
--- a/.ai/scripts/tests/drill-deck-sync.bats
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bats
-# Tests for the drill-deck-sync wrapper: argument handling + the stats gate.
-# The clean end-to-end path runs drill-to-anki.py (uv-resolved genanki) and is
-# not exercised here; these cover the guard paths that stop before that step.
-
-setup() {
- SCRIPT_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
- SYNC="$SCRIPT_DIR/drill-deck-sync"
- TMP="$(mktemp -d)"
-}
-
-teardown() {
- rm -rf "$TMP"
-}
-
-@test "drill-deck-sync: no args exits 2" {
- run "$SYNC"
- [ "$status" -eq 2 ]
-}
-
-@test "drill-deck-sync: missing source file exits 2" {
- run "$SYNC" "$TMP/nope.org"
- [ "$status" -eq 2 ]
-}
-
-@test "drill-deck-sync: stats gate failure exits 1 and writes no apkg" {
- cat > "$TMP/dirty.org" <<'EOF'
-#+TITLE: DeepSat Org-Drill Flashcards
-
-* Section
-** DeepSat :drill:
-*** Answer
-A satellite company.
-EOF
- run "$SYNC" "$TMP/dirty.org"
- [ "$status" -eq 1 ]
- [ ! -f "$HOME/sync/phone/anki/dirty.apkg" ]
-}