Add tools/password-store unit test (#103)
This commit is contained in:
parent
77298f3672
commit
febd14a9f2
1 changed files with 23 additions and 0 deletions
23
test/modules/tools/test-password-store.el
Normal file
23
test/modules/tools/test-password-store.el
Normal file
|
@ -0,0 +1,23 @@
|
|||
;;; test/modules/feature/test-password-store.el
|
||||
|
||||
(require! :tools password-store t)
|
||||
|
||||
;;
|
||||
(def-test-group! tools/password-store
|
||||
(ert-deftest get-field ()
|
||||
(let ((data `((secret . "defuse-account-gad")
|
||||
("login" . "HL2532-GANDI")
|
||||
("alt-login" . "hlissner")
|
||||
("email" . "henrik@lissner.net")
|
||||
("url" . "https://www.gandi.net/login"))))
|
||||
(should (equal (+pass-get-field data "login")
|
||||
"HL2532-GANDI"))
|
||||
(should (equal (+pass-get-field data "email")
|
||||
"henrik@lissner.net"))
|
||||
(should (equal (+pass-get-field data '("alt-login" "email"))
|
||||
"hlissner"))
|
||||
(should (equal (+pass-get-field data '("username" "email"))
|
||||
"henrik@lissner.net"))
|
||||
(should-not (+pass-get-field data '("x" "y" "z"))))
|
||||
|
||||
(should-error (+pass-get-field nil nil))))
|
Loading…
Add table
Add a link
Reference in a new issue