emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste 3a1eaca 183/298: Added integration tests for gist


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste 3a1eaca 183/298: Added integration tests for gist.github.com
Date: Thu, 9 Dec 2021 19:00:10 -0500 (EST)

branch: elpa/webpaste
commit 3a1eaca532a1b8086b0b1394192d58aff91b3812
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Added integration tests for gist.github.com
---
 tests/integration/test-webpaste-providers.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/tests/integration/test-webpaste-providers.el 
b/tests/integration/test-webpaste-providers.el
index 5608039..6180e19 100644
--- a/tests/integration/test-webpaste-providers.el
+++ b/tests/integration/test-webpaste-providers.el
@@ -7,7 +7,7 @@
 
 
 (describe
- "Test all providers with dummy data"
+ "Test provider with dummy data so it"
 
  (before-each
   ;; Block requests
@@ -92,6 +92,22 @@
 
 
  (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"
 
   (let ((provider (cadr (assoc "paste.pound-python.org" 
webpaste-providers-alist))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]