summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2018-08-15 01:16:44 +0200
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2018-08-16 23:02:37 +0200
commit799cc4f3a7bb434185d7d65e564c973734e9d6ab (patch)
tree8c67a37f2fcae4b3053be8ee865aa45ee94a24bd
parent238113ff62ec1ffca2eaf19822c5aa0ac047f760 (diff)
Add a test that killing a REPL buffer removes it from the list
-rw-r--r--test/cider-connection-tests.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/cider-connection-tests.el b/test/cider-connection-tests.el
index 64c08067..547a14e2 100644
--- a/test/cider-connection-tests.el
+++ b/test/cider-connection-tests.el
@@ -271,7 +271,23 @@
(with-temp-buffer
(setq major-mode 'clojurescript-mode)
(expect (cider-repls) :to-equal (list bb2 bb1))
- (expect (cider-repls "cljs") :to-equal (list bb2))))))))))))))
+ (expect (cider-repls "cljs") :to-equal (list bb2)))))))))))))
+
+ (describe "killed buffers"
+ (it "do not show up in it"
+ (let ((default-directory "/tmp/some-dir"))
+ (cider-test-with-buffers
+ (a b)
+ (let ((session (list "some-session" a b)))
+ (with-current-buffer a
+ (setq cider-repl-type "clj"))
+ (with-current-buffer b
+ (setq cider-repl-type "clj"))
+ (sesman-register 'CIDER session)
+ (expect (cider-repls) :to-equal (list a b))
+ (kill-buffer b)
+ (expect (cider-repls) :to-equal (list a))
+ (sesman-unregister 'CIDER session)))))))
(describe "cider--connection-info"
(spy-on 'cider--java-version :and-return-value "1.7")