diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-02-07 12:39:22 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2021-02-07 12:39:22 -0500 |
commit | 2339ba46872bf990129275771306182c82235dbf (patch) | |
tree | 456917ee4cb83a2c7ff3494b1f9e23eea06d7fe9 /tests | |
parent | 0cc9929f21448e7cb34ecc23bf9ff4fc7bef4773 (diff) | |
parent | f4975ba183c54ec364827380ee70c5ccc426e06f (diff) | |
download | piem-2339ba46872bf990129275771306182c82235dbf.tar.gz |
Merge branch 'km/copy-mid-url'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/piem-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/piem-tests.el b/tests/piem-tests.el index 795686a..969c9d0 100644 --- a/tests/piem-tests.el +++ b/tests/piem-tests.el @@ -49,6 +49,19 @@ (should (equal (piem-escape-mid "msg@id") "msg@id")) (should (equal (piem-escape-mid "m/g@id") "m%2Fg@id"))) +(ert-deftest piem-mid-url () + (let ((piem-inboxes '(("inbox-a" :url "https://example.com/a/") + ("inbox-b" :url "https://example.com/b/")))) + (should (equal (piem-mid-url "msg@id" "inbox-a") + "https://example.com/a/msg@id")) + (should (equal (piem-mid-url "m/sg@id" "inbox-b") + "https://example.com/b/m%2Fsg@id")) + (should-error (piem-mid-url "msg@id") + :type 'user-error)) + (let ((piem-inboxes '(("inbox-a")))) + (should-error (piem-mid-url "msg@id" "inbox-a") + :type 'user-error))) + (ert-deftest piem-name-branch-who-what-v () (should (equal (piem-name-branch-who-what-v (list :from "Foo Bar <f@example.com>" |