[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 26b4d21 192/298: Added test of appending mode nam
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 26b4d21 192/298: Added test of appending mode name to post data |
Date: |
Thu, 9 Dec 2021 19:00:12 -0500 (EST) |
branch: elpa/webpaste
commit 26b4d21412b6e8814b51b057fd36cc7c222f2f69
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added test of appending mode name to post data
---
.../test-webpaste-default-post-field-lambda.el | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/unit/test-webpaste-default-post-field-lambda.el
b/tests/unit/test-webpaste-default-post-field-lambda.el
new file mode 100644
index 0000000..d59e5c5
--- /dev/null
+++ b/tests/unit/test-webpaste-default-post-field-lambda.el
@@ -0,0 +1,27 @@
+;;; test-webpaste-default-post-field-lambda.el --- Tests for webpaste
+;;; Commentary:
+;;; Code:
+
+(load "tests/load-undercover.el")
+(require 'webpaste)
+
+(describe
+ "Default post field lambda"
+ (it
+ "can add language and text as post data"
+
+ (let ((post-lambda (webpaste-providers-default-post-field-lambda))
+ (major-mode 'fundamental-mode)
+ (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
+ '(("lang" . "text") ("content" . "my text") ("duration" . "1
day")))))))
+
+
+;;; test-webpaste-default-post-field-lambda.el ends here
- [nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pastes in browser, (continued)
- [nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pastes in browser, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d37a904 160/298: Fix POST bug for several providers, ELPA Syncer, 2021/12/09
- [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 <=
- [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, 2021/12/09
- [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