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

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

[nongnu] elpa/webpaste e0a35fd 232/298: WP-25: Add test for raw pastes


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste e0a35fd 232/298: WP-25: Add test for raw pastes
Date: Thu, 9 Dec 2021 19:00:20 -0500 (EST)

branch: elpa/webpaste
commit e0a35fdd2ce4ac7f85968934c418db1c8cd8b633
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>

    WP-25: Add test for raw pastes
---
 tests/unit/test-webpaste-default-post-field-lambda.el | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tests/unit/test-webpaste-default-post-field-lambda.el 
b/tests/unit/test-webpaste-default-post-field-lambda.el
index 3666037..022fcb6 100644
--- a/tests/unit/test-webpaste-default-post-field-lambda.el
+++ b/tests/unit/test-webpaste-default-post-field-lambda.el
@@ -21,7 +21,22 @@
                               :post-data '(("duration" . "1 day")))))
       (expect post-data
               :to-equal
-              '(("lang" . "text") ("content" . "my text") ("duration" . "1 
day")))))))
+              '(("lang" . "text") ("content" . "my text") ("duration" . "1 
day"))))))
 
+ (it
+  "can paste raw pastes"
+  (let ((post-lambda (webpaste--providers-default-post-field-lambda))
+        (major-mode 'fundamental-mode)
+        (webpaste-paste-raw-text t)
+        (webpaste--provider-lang-alists '(("https://example.com/"; . 
((fundamental-mode . "text"))))))
+    (let ((post-data (funcall post-lambda
+                              :text "my text"
+                              :post-field "content"
+                              :provider-uri "https://example.com/";
+                              :post-lang-field-name "lang"
+                              :post-data '(("duration" . "1 day")))))
+      (expect post-data
+              :to-equal
+              '(("content" . "my text") ("duration" . "1 day")))))))
 
 ;;; test-webpaste-default-post-field-lambda.el ends here



reply via email to

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