                                      :body circle-content}))
     (it "should return a bad request"
       (should= 400 (:status @response))
-      (should-contain response-content(:body @response)))))
-
+      (should-contain response-content (:body @response)))))
 
 (describe "governance rest api"
   (before-all (r/start-test-server))

  (it "should return status code 404 at the root"
    (should= 404 (:status (http-client/get "http://localhost:3000" {:throw-exceptions false}))))

  (context "when no circles have been created"
    (with response (http-client/get "http://localhost:3000/circles" {:throw-exceptions false}))
    (it "should return an empty array"
        (should= 200 (:status @response))
        (should= "[]" (:body @response))))

  (context "upon creating a circle"
    (with response (http-client/post "http://localhost:3000/circles" 
                                    {:throw-exceptions false
                                     :content-type :json
                                     :body (json/generate-string 
                                             {:name "Test Circle!"
                                              :lead-link-name "Bill"
                                              :lead-link-email "bfinn@example.com"})}))
    (it "should redirect"
      (should= 303 (:status @response))
      (should-contain "application/json" (get-in @response [:headers "Content-Type"]))
      (should-contain #"^\/circles\/\d+" (get (json/parse-string (:body @response)) "location")))

    (context "and getting the created circle"
      (with location (get (json/parse-string 
                            (:body (http-client/post 
                                     "http://localhost:3000/circles" 

          (should= 200 (:status @get-response))
          (should= {"lead-link" {"email" "bfinn@example.com"
                                 "name" "Bill" } "name" "Test Circle!"} 
                   (json/parse-string (:body @get-response)))))
  
    (context "when creating multiple circles"
      (before (http-client/post "http://localhost:3000/circles" 
                                      {:content-type :json
                                       :body (json/generate-string 
                                               {:name "Test Circle!"
                                                :lead-link-name "Bill"
                                                :lead-link-email "bfinn@example.com"})}))

      (before (http-client/post "http://localhost:3000/circles" 
                                      {:content-type :json
                                       :body (json/generate-string 
                                               {:name "Test Circle 2"
                                                :lead-link-name "Bill"
                                                :lead-link-email "bfinn@example.com"})}))
      (with get-response (http-client/get "http://localhost:3000/circles" 
                                          {:throw-exceptions false}))

      (it "should return an array of created circles"
        (should= 200 (:status @get-response))
        (should-contain "application/json" (get-in @get-response 
                                                   [:headers "Content-Type"]))
        (should= 2 (count (json/parse-string (:body @get-response)))))))

  (context "roles"
    (context "with a new circle"
      (before (http-client/post "http://localhost:3000/circles" 
                                {:content-type :json
                                 :body (json/generate-string 
                                         {:name "Test Circle 2"
                                          :lead-link-name "Bill"
                                          :lead-link-email "bfinn@example.com"})}))

        (context "when requesting the list of roles"
           (it "should return an empty array")))))