diff options
Diffstat (limited to 'test/lisp/auth-source-tests.el')
| -rw-r--r-- | test/lisp/auth-source-tests.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lisp/auth-source-tests.el b/test/lisp/auth-source-tests.el index 2f5a9320b17..1f6737cb7c8 100644 --- a/test/lisp/auth-source-tests.el +++ b/test/lisp/auth-source-tests.el | |||
| @@ -292,6 +292,7 @@ | |||
| 292 | ;; The "session" collection is temporary for the lifetime of the | 292 | ;; The "session" collection is temporary for the lifetime of the |
| 293 | ;; Emacs process. Therefore, we don't care to delete it. | 293 | ;; Emacs process. Therefore, we don't care to delete it. |
| 294 | (let ((auth-sources '((:source (:secrets "session")))) | 294 | (let ((auth-sources '((:source (:secrets "session")))) |
| 295 | (auth-source-save-behavior t) | ||
| 295 | (host (md5 (concat (prin1-to-string process-environment) | 296 | (host (md5 (concat (prin1-to-string process-environment) |
| 296 | (current-time-string)))) | 297 | (current-time-string)))) |
| 297 | (passwd (md5 (concat (prin1-to-string process-environment) | 298 | (passwd (md5 (concat (prin1-to-string process-environment) |
| @@ -315,7 +316,14 @@ | |||
| 315 | (funcall auth-passwd) | 316 | (funcall auth-passwd) |
| 316 | auth-passwd)) | 317 | auth-passwd)) |
| 317 | (should (string-equal (plist-get auth-info :user) (user-login-name))) | 318 | (should (string-equal (plist-get auth-info :user) (user-login-name))) |
| 318 | (should (string-equal auth-passwd passwd)))) | 319 | (should (string-equal (plist-get auth-info :host) host)) |
| 320 | (should (string-equal auth-passwd passwd)) | ||
| 321 | |||
| 322 | ;; Cleanup. | ||
| 323 | ;; Should use `auth-source-delete' when implemented for :secrets backend. | ||
| 324 | (secrets-delete-item | ||
| 325 | "session" | ||
| 326 | (format "%s@%s" (plist-get auth-info :user) (plist-get auth-info :host))))) | ||
| 319 | 327 | ||
| 320 | (provide 'auth-source-tests) | 328 | (provide 'auth-source-tests) |
| 321 | ;;; auth-source-tests.el ends here | 329 | ;;; auth-source-tests.el ends here |