From: Damien Cassou Date: Mon, 26 Mar 2018 06:56:16 +0000 (+0200) Subject: Test checking that auth-source-pass backend is correctly installed X-Git-Tag: emacs-27.0.90~4932 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47ccee220a49dea8c35318f83b854dfa368606ec;p=emacs.git Test checking that auth-source-pass backend is correctly installed * test/lisp/auth-source-pass-tests.el (auth-source-pass-can-start-from-auth-source-search): Add test. --- diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el index 431e4e411d9..b30419f44b0 100644 --- a/test/lisp/auth-source-pass-tests.el +++ b/test/lisp/auth-source-pass-tests.el @@ -244,6 +244,13 @@ This function is intended to be set to `auth-source-debug`." (should (auth-source-pass--entry-valid-p "foo")) (should-not (auth-source-pass--entry-valid-p "bar")))) +(ert-deftest auth-source-pass-can-start-from-auth-source-search () + (auth-source-pass--with-store '(("gitlab.com" ("user" . "someone"))) + (auth-source-pass-enable) + (let ((result (car (auth-source-search :host "gitlab.com")))) + (should (equal (plist-get result :user) "someone")) + (should (equal (plist-get result :host) "gitlab.com"))))) + (provide 'auth-source-pass-tests) ;;; auth-source-pass-tests.el ends here