[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste bb7a705 184/298: Added unit test for simpleclip f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste bb7a705 184/298: Added unit test for simpleclip feature |
Date: |
Thu, 9 Dec 2021 19:00:10 -0500 (EST) |
branch: elpa/webpaste
commit bb7a705a183f5b41865d63c1364c40c18eaa7311
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added unit test for simpleclip feature
---
tests/unit/test-webpaste-return-url.el | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-webpaste-return-url.el
b/tests/unit/test-webpaste-return-url.el
index ad55749..aaf9b36 100644
--- a/tests/unit/test-webpaste-return-url.el
+++ b/tests/unit/test-webpaste-return-url.el
@@ -12,7 +12,8 @@
(before-each
(spy-on 'message)
(spy-on 'kill-new)
- (spy-on 'browse-url-generic))
+ (spy-on 'browse-url-generic)
+ (spy-on 'simpleclip-set-contents))
(it
"can put in kill-ring and message the user"
@@ -53,7 +54,23 @@
(expect 'kill-new
:to-have-been-called-with
- "https://example.com/?lang=lisp"))))
+ "https://example.com/?lang=lisp")))
+
+ (it
+ "can put contents in clipboard using simpleclip"
+ (let ((webpaste/copy-to-clipboard t)
+ (webpaste/webpaste/add-to-killring nil))
+
+ (webpaste-return-url "https://example.com/")
+
+ (expect 'simpleclip-set-contents
+ :to-have-been-called-with
+ "https://example.com/")
+
+ (expect 'message
+ :to-have-been-called-with
+ "URL copied to clipboard."))))
+
;;; test-webpaste-return-url.el ends here
- [nongnu] elpa/webpaste 0f79722 270/298: Add wrapper around webpaste for buffer and region, (continued)
- [nongnu] elpa/webpaste 0f79722 270/298: Add wrapper around webpaste for buffer and region, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 20da215 271/298: Add unit tests for pasting buffer OR region depending on context, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e892ef2 277/298: webpaste: Add custom to limit amount of retries, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste bd2bf6a 281/298: github-actions: Set up github actions and undercover for unit tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 54e2ed4 178/298: Added integration test for ix.io, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 26a8035 197/298: Switched to simpler provider definitions where we don't store lambdas in the alist, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e2ba2f5 282/298: github-actions: Set up github actions for integration tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 67a1a8c 295/298: Copyright header shouldn't be a range of years, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b063ddd 292/298: README: Update number of providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0c814bc 179/298: Added integration test for sprunge.us, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste bb7a705 184/298: Added unit test for simpleclip feature,
ELPA Syncer <=
- [nongnu] elpa/webpaste bd1ec2a 187/298: Disabled one test since it doesn't work, but really should..., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste de5cbd2 190/298: Update contributor guidelines to match codestyle, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2b1051a 293/298: Update version numbers and copyright header, ELPA Syncer, 2021/12/09