slackbuilds/magit.etest
Phil Jackson 8ea39540d9 A simple caching mechanism to ease the `magit-get-svn-ref-info' pain.
* magit.el: Every call to `magit-get-svn-ref-info', post the first, retrieves a cached list.
2009-10-28 20:37:35 +00:00

16 lines
No EOL
608 B
Text

(require 'el-mock)
(etest
("svn"
(equal (assoc 'trunk-ref-name
(with-mock
(stub magit-get => "someproject/trunk:refs/remotes/hello/trunk")
(magit-get-svn-ref-info)))
'(trunk-ref-name . "trunk")
"correct trunk-ref-name from `magit-get-svn-ref-info'")
(equal (assoc 'ref-path
(with-mock
(stub magit-get => "someproject/trunk:refs/remotes/hello/trunk")
(magit-get-svn-ref-info)))
'(refpath . "refs/remotes/hello/")
"correct refpath from `magit-get-svn-ref-info'")))