summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <public@thanosapollo.org>2026-04-30 15:46:55 +0300
committerThanos Apollo <public@thanosapollo.org>2026-04-30 15:46:55 +0300
commit77c86b9f21b2d7ef3a3857695476f401408ee40c (patch)
tree20e62c5ccfd405e9872b6d07268040d5bd52b419
parent0a9a191da7bb7562570f8c0764650f373f74fd6b (diff)
test: Fix for interactive token prompt.
-rw-r--r--tests/forgejo-test-api.el3
-rw-r--r--tests/forgejo-test-host.el5
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/forgejo-test-api.el b/tests/forgejo-test-api.el
index 06baefe..c990314 100644
--- a/tests/forgejo-test-api.el
+++ b/tests/forgejo-test-api.el
@@ -131,7 +131,8 @@
(let ((forgejo-hosts '(("https://codeberg.org")))
(forgejo-token-use-auth-source nil)
(forgejo-token nil))
- (should-error (forgejo-token "https://codeberg.org") :type 'user-error)))
+ (cl-letf (((symbol-function 'y-or-n-p) (lambda (_prompt) nil)))
+ (should-error (forgejo-token "https://codeberg.org") :type 'user-error))))
;;; Group 6: Header parsing with rate limits
diff --git a/tests/forgejo-test-host.el b/tests/forgejo-test-host.el
index 5baf6dc..a90529b 100644
--- a/tests/forgejo-test-host.el
+++ b/tests/forgejo-test-host.el
@@ -66,8 +66,9 @@
(let ((forgejo-hosts '(("https://codeberg.org")))
(forgejo-token-use-auth-source nil)
(forgejo-token nil))
- (should-error (forgejo-token "https://codeberg.org")
- :type 'user-error)))
+ (cl-letf (((symbol-function 'y-or-n-p) (lambda (_prompt) nil)))
+ (should-error (forgejo-token "https://codeberg.org")
+ :type 'user-error))))
(ert-deftest forgejo-test-host-token-validates-first ()
"Token lookup validates host before searching."