From e8d6adbe91961a8297a9b9df86ae3aebfba634fb Mon Sep 17 00:00:00 2001 From: Justin Holguin Date: Sun, 31 Jan 2016 12:20:05 -0800 Subject: [PATCH] Fix order in test assertions The convention for clojure.test is `(is (= expected actual))`, which is the reverse of what the template uses in handler_test.clj. This commit switches the arguments to `=` so that failures will be reported correctly. --- resources/leiningen/new/compojure/handler_test.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/leiningen/new/compojure/handler_test.clj b/resources/leiningen/new/compojure/handler_test.clj index 158733b..543c1c1 100644 --- a/resources/leiningen/new/compojure/handler_test.clj +++ b/resources/leiningen/new/compojure/handler_test.clj @@ -6,9 +6,9 @@ (deftest test-app (testing "main route" (let [response (app (mock/request :get "/"))] - (is (= (:status response) 200)) - (is (= (:body response) "Hello World")))) + (is (= 200 (:status response))) + (is (= "Hello World" (:body response))))) (testing "not-found route" (let [response (app (mock/request :get "/invalid"))] - (is (= (:status response) 404))))) + (is (= 404 (:status response))))))