aboutsummaryrefslogtreecommitdiff
path: root/tests/test-setup-telega.bats
Commit message (Collapse)AuthorAgeFilesLines
* feat(setup-telega): install the telega Emacs package alongside docker setupCraig Jennings2026-05-141-0/+47
| | | | | | | | | | | | | | | | | | | | modules/telega-config.el uses `:ensure nil' on the use-package block (a stale MELPA archive index can 404 and take startup down if auto-install runs in init). The trade-off was that a fresh clone needed a one-time `M-x package-install RET telega' before the dashboard launcher or `C-; G' would work -- the autoload stub would fail with `Cannot open load file: telega' instead. Hit it on this machine just now: dashboard pressed, autoload tried to load telega.el, no telega.el on the load-path, cryptic error. Add `ensure_telega_package' to the setup script: probe with `(package-installed-p 'telega)' under `emacs --batch'; if absent, refresh MELPA and install via package.el; if that fails, surface the manual recovery path. Wire it into `main' after the docker checks. Four new bats tests cover the missing-emacs, already- installed, install-succeeds, and install-fails paths with `emacs' stubbed at the function level.
* feat(setup): scripts/setup-telega.sh prepares the docker environment for telegaCraig Jennings2026-05-131-0/+87
Verifies docker is installed and the daemon is reachable, then either pulls a public image (when `TELEGA_DOCKER_IMAGE` is set) or announces the in-Emacs build path (`M-x telega-server-build`) for the user to run once. Telegram auth (phone + verification code) is interactive on first `M-x telega` and not scripted here. Same shape as setup-email.sh: helpers are sourceable for bats, `main` runs only under direct execution. 7 bats tests stub `docker` and `command` so the suite never talks to the real daemon.