diff options
Diffstat (limited to 'tests/test-pearl-accounts.el')
| -rw-r--r-- | tests/test-pearl-accounts.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-pearl-accounts.el b/tests/test-pearl-accounts.el index 7994905..4de9c2f 100644 --- a/tests/test-pearl-accounts.el +++ b/tests/test-pearl-accounts.el @@ -78,6 +78,13 @@ "An unrecognized source tag errors rather than silently yielding nil." (should-error (pearl--resolve-api-key-source '(:bogus "x") "work") :type 'error)) +(ert-deftest test-pearl-resolve-api-key-source-missing-is-user-error () + "A missing credential is a user-config problem, surfaced as a `user-error'." + (cl-letf (((symbol-function 'auth-source-search) (lambda (&rest _) nil))) + (should-error (pearl--resolve-api-key-source + '(:auth-source :host "api.linear.app" :user "work") "work") + :type 'user-error))) + ;;; pearl--resolve-account (ert-deftest test-pearl-resolve-account-returns-full-context () |
