Permalink
Browse files

Rename langohr.http/declare-user to langohr.http/add-user

  • Loading branch information...
1 parent 14e027f commit bd3e441fa1a734db54d28c01dc7701d663e0ae71 @michaelklishin committed Mar 6, 2014
Showing with 7 additions and 2 deletions.
  1. +6 −1 src/clojure/langohr/http.clj
  2. +1 −1 test/langohr/test/http_api_test.clj
@@ -224,10 +224,15 @@
[^String vhost]
(get-and-decode-json (url-with-path (format "/api/vhosts/%s" (URLEncoder/encode vhost)))))
-(defn declare-vhost
+(defn add-vhost
[^String vhost]
(put (url-with-path (format "api/vhosts/%s" (URLEncoder/encode vhost))) {:body {:name vhost}}))
+(defn ^{:deprecated true} declare-vhost
+ "Deprecated. Use add-vhost."
+ [^String vhost]
+ (add-vhost vhost))
+
(defn delete-vhost
[^String vhost]
(delete (url-with-path (format "/api/vhosts/%s" (URLEncoder/encode vhost)))))
@@ -143,7 +143,7 @@
(deftest ^{:http true} test-vhost-manipulations
(let [vhost "new-vhost"]
(is (not (hc/vhost-exists? vhost)))
- (hc/declare-vhost vhost)
+ (hc/add-vhost vhost)
(is (hc/vhost-exists? vhost))
(hc/delete-vhost vhost)))

0 comments on commit bd3e441

Please sign in to comment.