[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 655a364 205/298: Remove local variables since it
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 655a364 205/298: Remove local variables since it became easier to get the providers |
Date: |
Thu, 9 Dec 2021 19:00:15 -0500 (EST) |
branch: elpa/webpaste
commit 655a364fb1a6c9f3d49a0bbaf338bbf492b5b4d1
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Remove local variables since it became easier to get the providers
---
tests/integration/test-webpaste-providers.el | 90 ++++++++--------------------
1 file changed, 26 insertions(+), 64 deletions(-)
diff --git a/tests/integration/test-webpaste-providers.el
b/tests/integration/test-webpaste-providers.el
index 4cc24dd..83df1d8 100644
--- a/tests/integration/test-webpaste-providers.el
+++ b/tests/integration/test-webpaste-providers.el
@@ -8,119 +8,81 @@
(describe
"Test provider with dummy data so it"
- :var (paste-message)
+ :var (paste-message webpaste--paste-text webpaste--return-url)
(before-each
- ;; Block requests
(setq paste-message ";; This is a build artifact created by an integration
test for https://github.com/etu/webpaste.el")
+ ;; Block requests to failovers and returning of URLs
(spy-on 'webpaste--paste-text)
(spy-on 'webpaste--return-url))
+
(it
"can paste with ptpb.pw"
- (let ((provider (webpaste--get-provider-by-name "ptpb.pw")))
- (funcall
- provider
- paste-message
- :sync t)
-
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)
+ (funcall (webpaste--get-provider-by-name "ptpb.pw") paste-message :sync t)
- (expect (spy-calls-most-recent 'webpaste--return-url)
- :to-equal
- (make-spy-context :current-buffer (current-buffer)
- :args '("https://ptpb.pw/h54Z")
- :return-value nil))))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))
(it
"can paste with ix.io"
- (let ((provider (webpaste--get-provider-by-name "ix.io")))
- (funcall
- provider
- paste-message
- :sync t)
-
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)
+ (funcall (webpaste--get-provider-by-name "ix.io") paste-message :sync t)
- (expect (spy-calls-most-recent 'webpaste--return-url)
- :to-equal
- (make-spy-context :current-buffer (current-buffer)
- :args '("http://ix.io/xFF")
- :return-value nil))))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))
(it
"can paste with sprunge.us"
- (let ((provider (webpaste--get-provider-by-name "sprunge.us")))
- (funcall
- provider
- paste-message
- :sync t)
+ (funcall (webpaste--get-provider-by-name "sprunge.us") paste-message :sync t)
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))
(it
"can paste with dpaste.com"
- (let ((provider (webpaste--get-provider-by-name "dpaste.com")))
- (funcall
- provider
- paste-message
- :sync t)
+ (funcall (webpaste--get-provider-by-name "dpaste.com") paste-message :sync t)
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))
(it
"can paste with dpaste.de"
- (let ((provider (webpaste--get-provider-by-name "dpaste.de")))
- (funcall
- provider
- paste-message
- :sync t)
+ (funcall (webpaste--get-provider-by-name "dpaste.de") paste-message :sync t)
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (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
+ ;; 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 (webpaste--get-provider-by-name "gist.github.com")))
- (funcall
- provider
- paste-message
- :sync t)
+ (funcall (webpaste--get-provider-by-name "gist.github.com") paste-message
:sync t)
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
+ (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"
- (let ((provider (webpaste--get-provider-by-name "paste.pound-python.org")))
- (funcall
- provider
- paste-message
- :sync t)
+ (funcall (webpaste--get-provider-by-name "paste.pound-python.org")
paste-message :sync t)
- (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
- (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0))))
+ (expect (spy-calls-count 'webpaste--return-url) :to-equal 1)
+ (expect (spy-calls-count 'webpaste--paste-text) :to-equal 0)))
;;; test-webpaste-providers.el ends here
- [nongnu] elpa/webpaste 30e78d6 164/298: Refactored the error callbacks, (continued)
- [nongnu] elpa/webpaste 30e78d6 164/298: Refactored the error callbacks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d27e571 182/298: Added integration tests for paste.pound-python.org, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 76d4ddb 162/298: Update test to test the right function, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4937b30 177/298: Change integration test to contain a link to webpaste in the pasted message, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6b0043b 181/298: Added integration tests for dpaste.de, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 505ffb3 189/298: Switched all webpaste/whatever to webpaste-watever to comply with elisp guidelines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0546284 176/298: Added types to some defcustom missing it, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 321e6a4 191/298: Added more details for contributing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 26b4d21 192/298: Added test of appending mode name to post data, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation for creation of custom providers., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 655a364 205/298: Remove local variables since it became easier to get the providers,
ELPA Syncer <=
- [nongnu] elpa/webpaste d6967bd 217/298: Check emacs version after emacs install, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2da60b8 223/298: Bump version for new release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 1925521 228/298: Add emacs 26.1 to tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 9c5e921 234/298: WP-25: Add README for raw pastes, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3d639f1 256/298: Merge branch 'fix-undercover', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 51b20d9 235/298: Merge branch 'WP-25-raw-pastes', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 22f64b7 255/298: undercover: Fix up undercover reporting, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste a8b682a 239/298: Add toml lang to ptpb.pw default, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2c399a0 243/298: Tests: Add unit tests for shebangs to override major-mode, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste a3a9a77 251/298: Remove spaces at end of lines, ELPA Syncer, 2021/12/09