[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste d475f02 170/298: Added integration test for ptpb.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste d475f02 170/298: Added integration test for ptpb.pw |
Date: |
Thu, 9 Dec 2021 19:00:08 -0500 (EST) |
branch: elpa/webpaste
commit d475f024b4fd0795decb3b4c3d43ec6e7aaa3a4c
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added integration test for ptpb.pw
---
Makefile | 4 ++++
tests/integration/test-webpaste-providers.el | 33 ++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/Makefile b/Makefile
index 77d0d0c..16712d9 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,10 @@ test:
unit:
${CASK} exec buttercup -L . tests/unit/
+# Run all tests in tests/integration/
+integration:
+ ${CASK} exec buttercup -L . tests/integration/
+
build:
${CASK} build
diff --git a/tests/integration/test-webpaste-providers.el
b/tests/integration/test-webpaste-providers.el
new file mode 100644
index 0000000..38db120
--- /dev/null
+++ b/tests/integration/test-webpaste-providers.el
@@ -0,0 +1,33 @@
+;;; test-webpaste-providers.el --- Tests for webpaste providers
+;;; Commentary:
+;;; Code:
+
+(load "tests/load-undercover.el")
+(require 'webpaste)
+
+
+(describe
+ "Test all providers with dummy data"
+
+ (before-each
+ ;; Block requests
+ (spy-on 'webpaste-paste-text)
+ (spy-on 'webpaste-return-url))
+
+ (it
+ "can paste with ptpb.pw"
+
+ (let ((provider (cadr (assoc "ptpb.pw" webpaste-providers-alist))))
+ (funcall provider ";; This is my test text" :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-most-recent 'webpaste-return-url)
+ :to-equal
+ (make-spy-context :current-buffer (current-buffer)
+ :args '("https://ptpb.pw/Dj5w")
+ :return-value nil)))))
+
+
+;;; test-webpaste-providers.el ends here
- [nongnu] elpa/webpaste b5491ab 150/298: Bump version for stable release, (continued)
- [nongnu] elpa/webpaste b5491ab 150/298: Bump version for stable release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 29d10d7 151/298: Added paste.pound-python.org as provider, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 410e286 152/298: Added webpaste confirmation tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste db8c605 154/298: Rewrite test to cover both if link is opened in external browser or not, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6b93c89 153/298: Merge branch 'naclander-master', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d2ed48a 156/298: Added unit test for appending of language to returning links, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 899e08e 157/298: Change install method of emacs in travis for faster build times, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e87a37c 158/298: Switched from ert to buttercup for testing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 865ff10 159/298: Disable this test for now since it breaks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 59fd22f 161/298: Merge branch 'naclander-POST-bug', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d475f02 170/298: Added integration test for ptpb.pw,
ELPA Syncer <=
- [nongnu] elpa/webpaste 95de0b8 169/298: Remove sync as a provider parameter on creation and add it on execution, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste fd4332a 172/298: Merge branch 'test-providers-on-travis', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 60c0a98 167/298: Added printing of travis event type, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d0442ad 168/298: Renamed all unit tests to make it easier for integration tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste cac4979 173/298: Added option to send returned URL to clpboard, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste db393a1 175/298: Merge branch 'naclander-copy-to-clipboard', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 92f309e 188/298: Added a contributing guidelines file, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ddd2fca 186/298: Added tests for success lambdas, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2a05d02 194/298: Added supports for custom hooks when returning URLs. This fixes #22., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b96e411 204/298: Moved the paste message to be a variable used for all integration tests, ELPA Syncer, 2021/12/09