aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-03 19:40:21 -0500
committerCraig Jennings <c@cjennings.net>2026-05-03 19:40:21 -0500
commitda88916114ad290610618d39982435ec46ed20a4 (patch)
treea819277a4e299e67cd17cdbd674507e41b582e7f /modules
parent76918a47d15e0e944c21e7b5ed043197492f55cf (diff)
downloaddotemacs-da88916114ad290610618d39982435ec46ed20a4.tar.gz
dotemacs-da88916114ad290610618d39982435ec46ed20a4.zip
test: cover auth-config helpers and oauth2 cache fix
I added 13 new tests across 5 files, covering the auth-config functions that lacked tests. Categories follow Normal / Boundary / Error where applicable. `cj/toggle-auth-source-debug` flips state once and back through two toggles. `cj/oauth2-auto--plstore-read-fixed` gets three tests: cache miss reads then caches, cache hit skips `plstore-open` entirely, and the `unwind-protect` runs `plstore-close` even when `plstore-get` signals. `cj/reset-auth-cache` covers no-prefix (skip `shell-command`), with-prefix success, and with-prefix shell failure (Emacs caches still clear). `cj/kill-gpg-agent` covers shell exit 0 and non-zero. `cj/clear-oauth2-auto-cache` covers bound-with-entries, bound-but-empty, and unbound. The unbound test restores the binding via `unwind-protect` so other tests in the same Emacs session don't void-variable. I stubbed every boundary via `cl-letf` (`plstore-open`, `plstore-get`, `plstore-close`, `oauth2-auto--compute-id`, `auth-source-forget-all-cached`, `epa-file-clear-cache`, `shell-command`, `message`, `call-process`) and didn't stub any internal helpers. 15 auth-config tests pass together: 2 existing plus 13 new.
Diffstat (limited to 'modules')
0 files changed, 0 insertions, 0 deletions