|
|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(describe |
|
|
|
|
"Test all providers with dummy data" |
|
|
|
|
"Test provider with dummy data so it" |
|
|
|
|
|
|
|
|
|
(before-each |
|
|
|
|
;; Block requests |
|
|
|
|
@ -91,6 +91,22 @@ |
|
|
|
|
(expect (spy-calls-count 'webpaste-paste-text) :to-equal 0))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(it |
|
|
|
|
"can paste with gist.github.com" |
|
|
|
|
|
|
|
|
|
;; Override function to extract filename from a filepath, otherwise it breaks during integration tests |
|
|
|
|
(spy-on 'file-name-nondirectory :and-return-value "file.txt") |
|
|
|
|
|
|
|
|
|
(let ((provider (cadr (assoc "gist.github.com" webpaste-providers-alist)))) |
|
|
|
|
(funcall |
|
|
|
|
provider |
|
|
|
|
";; This is a build artifact made from an integration test for https://github.com/etu/webpaste.el" |
|
|
|
|
:sync t) |
|
|
|
|
|
|
|
|
|
(expect (spy-calls-count 'webpaste-return-url) :to-equal 1) |
|
|
|
|
(expect (spy-calls-count 'webpaste-paste-text) :to-equal 0))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(it |
|
|
|
|
"can paste with paste.pound-python.org" |
|
|
|
|
|
|
|
|
|
|