             (is (= (:body (handler allowed)) allowed))))
 
         (testing "async with nil as allowed request method"
-          (let [handler (method-handler nil)
+          (let [handler (async-method-handler nil)
                 rsp     (promise)
                 ex      (promise)]
             (handler allowed rsp ex)

             :request-method allowed}]
    :policy :reject}))

(deftest wrap-access-rules-method-test
  (let [allowed {:uri "/comments/1" :request-method :get}
        forbidden (assoc allowed :request-method :delete)]

    (testing "access rule pattern"
      (let [method-handler (partial method-handler :pattern #"/comments/\d+")]

        (testing "with keyword as allowed method"
          (let [handler (method-handler :get)]

    (let [req {:uri "/path3"}
          rsp (promise)
          ex  (promise)]
      (async-handler3 req rsp ex)
      (is (instance? clojure.lang.ExceptionInfo @ex))
      (is (not (realized? rsp)))))

