Skip to content

Instantly share code, notes, and snippets.

@cch1
Forked from mwmitchell/mocking-ex.clj
Created February 6, 2012 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cch1/1755090 to your computer and use it in GitHub Desktop.
Save cch1/1755090 to your computer and use it in GitHub Desktop.
with metaconstants
(facts "/locations/:id/rates should limit the rate response count by the :limit param"
(let [params [:check_in (gen-check-in)
:check_out (gen-check-out)
:guests 1
:rooms 1
:limit ...limit...]]
(apply location-rate-request (:tid location-one) params) => truthy
(provided
(apij.models.hotel-search/search
(contains {:params (contains {:limit apij.views.rates.common/max-hotels})}))
=> {:docs []}
(apij.models.rate/search
(as-checker sequential?)
(as-checker string?)
(as-checker string?)
(as-checker (contains {:per-page ...limit...}))
(as-checker map?)
(as-checker string?))
=> {})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment