Added unit test for appending of language to returning links

master
Elis Axelsson 9 years ago
parent 7b84568217
commit d2ed48a809
No known key found for this signature in database
GPG Key ID: D57EFA625C9A925F
  1. 11
      test/webpaste-test.el

@ -110,7 +110,16 @@
(let ((webpaste/open-in-browser t)(webpaste-test/opened-in-browser nil))
(webpaste-return-url "https://example.com/")
(should (equal webpaste-test/opened-in-browser t)))))
(should (equal webpaste-test/opened-in-browser t))))
;; Test appending of language to links when returning
(let ((webpaste/provider-separators
'(("https://example.com/" . "?lang=")))
(webpaste/provider-lang-alists
'(("https://example.com/" . ((fundamental-mode . "text"))))))
(should (equal (webpaste-return-url "https://example.com/")
"Added \"https://example.com/?lang=text\" to kill ring."))))

Loading…
Cancel
Save