Permalink
Browse files

Introduce langohr.http/list-enabled-protocols

  • Loading branch information...
1 parent 8c1e489 commit cbe7e0dcbc8ec6416f32be2cce07bfeb5976deba @michaelklishin committed Mar 10, 2014
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/clojure/langohr/http.clj
  2. +4 −0 test/langohr/test/http_api_test.clj
@@ -101,6 +101,10 @@
[]
(get-and-decode-json (url-with-path "/api/overview")))
+(defn list-enabled-protocols
+ []
+ (let [m (get-overview)]
+ (set (map :protocol (:listeners m)))))
(defn list-nodes
[]
@@ -181,3 +181,7 @@
(is (not (rmq/open? c2)))
(is (rmq/open? c3))
(rmq/close c3))))
+
+(deftest ^{:http true} test-enabled-protocols
+ (let [xs (hc/list-enabled-protocols)]
+ (is (xs "amqp"))))

0 comments on commit cbe7e0d

Please sign in to comment.