]> git.eshelyaron.com Git - emacs.git/commitdiff
Test checking that auth-source-pass backend is correctly installed
authorDamien Cassou <damien@cassou.me>
Mon, 26 Mar 2018 06:56:16 +0000 (08:56 +0200)
committerNicolas Petton <nicolas@petton.fr>
Tue, 5 Jun 2018 13:53:33 +0000 (15:53 +0200)
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-can-start-from-auth-source-search): Add test.

test/lisp/auth-source-pass-tests.el

index 431e4e411d94780b148cdd0f32b64adeb84e4a32..b30419f44b0e8d657e298f390bd02a660db7c985 100644 (file)
@@ -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