Permalink
Browse files

update changelog

  • Loading branch information...
dakrone committed Mar 20, 2012
1 parent bcd64f4 commit 9f873870b32d0278873c29d648e6a1807793e110
Showing with 22 additions and 19 deletions.
  1. +3 −0 changelog.org
  2. +19 −19 test/clj_http/test/client.clj
View
@@ -99,6 +99,9 @@
* Work log
Log of merges/issues/work that's gone in so I know what to put in
the changelog for the next release
+** 2012-03-20
+ - merged https://github.com/dakrone/clj-http/pull/53 to add status
+ functions into the clj-http.client namespace
** 2012-03-17
- added the ability to specify {:as :clojure} to get back a clojure
datastructure, or {:as :auto} with content-type=application/clojure
@@ -341,29 +341,29 @@
(deftest test-status-predicates
(testing "2xx statuses"
(doseq [s (range 200 299)]
- (is (client/success? { :status s }))
- (is (not (client/redirect? { :status s })))
- (is (not (client/client-error? { :status s })))
- (is (not (client/server-error? { :status s })))))
+ (is (client/success? {:status s}))
+ (is (not (client/redirect? {:status s})))
+ (is (not (client/client-error? {:status s})))
+ (is (not (client/server-error? {:status s})))))
(testing "3xx statuses"
(doseq [s (range 300 399)]
- (is (not (client/success? { :status s })))
- (is (client/redirect? { :status s }))
- (is (not (client/client-error? { :status s })))
- (is (not (client/server-error? { :status s })))))
+ (is (not (client/success? {:status s})))
+ (is (client/redirect? {:status s}))
+ (is (not (client/client-error? {:status s})))
+ (is (not (client/server-error? {:status s})))))
(testing "4xx statuses"
(doseq [s (range 400 499)]
- (is (not (client/success? { :status s })))
- (is (not (client/redirect? { :status s })))
- (is (client/client-error? { :status s }))
- (is (not (client/server-error? { :status s })))))
+ (is (not (client/success? {:status s})))
+ (is (not (client/redirect? {:status s})))
+ (is (client/client-error? {:status s}))
+ (is (not (client/server-error? {:status s})))))
(testing "5xx statuses"
(doseq [s (range 500 599)]
- (is (not (client/success? { :status s })))
- (is (not (client/redirect? { :status s })))
- (is (not (client/client-error? { :status s })))
- (is (client/server-error? { :status s }))))
+ (is (not (client/success? {:status s})))
+ (is (not (client/redirect? {:status s})))
+ (is (not (client/client-error? {:status s})))
+ (is (client/server-error? {:status s}))))
(testing "409 Conflict"
- (is (client/conflict? { :status 409 }))
- (is (not (client/conflict? { :status 201 })))
- (is (not (client/conflict? { :status 404 })))))
+ (is (client/conflict? {:status 409}))
+ (is (not (client/conflict? {:status 201})))
+ (is (not (client/conflict? {:status 404})))))

0 comments on commit 9f87387

Please sign in to comment.