Skip to content

Commit

Permalink
Add a test for activate docset
Browse files Browse the repository at this point in the history
  • Loading branch information
areina committed Dec 3, 2015
1 parent 2bc14a5 commit 3ca01ed
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/helm-dash-test.el
Expand Up @@ -77,7 +77,6 @@
(docset "C++"))
(should (equal (helm-dash-sub-docset-name-in-pattern pattern docset) "printf"))))


;;;; helm-dash-result-url

(ert-deftest helm-dash-result-url/checks-docset-types ()
Expand Down Expand Up @@ -115,6 +114,18 @@
;; ignored docset:
(should-not (member "Man_Pages" docsets))))

;;;; helm-dash-activate-docset

(ert-deftest helm-dash-activate-docset ()
(let ((helm-dash-common-docsets '("Redis" "Go" "CSS"))
(helm-dash-connections
'(("Redis" "/tmp/.docsets/Redis.docset/Contents/Resources/docSet.dsidx" "DASH")
("Go" "/tmp/.docsets/Go.docset/Contents/Resources/docSet.dsidx" "DASH")
("CSS" "/tmp/.docsets/CSS.docset/Contents/Resources/docSet.dsidx" "ZDASH"))))
(helm-dash-activate-docset "Clojure")
(should (equal'("Clojure" "Redis" "Go" "CSS") helm-dash-common-docsets))
(should (equal nil helm-dash-connections))))

(provide 'helm-dash-test)

;;; helm-dash-test ends here

0 comments on commit 3ca01ed

Please sign in to comment.