Skip to content

Instantly share code, notes, and snippets.

@mwmitchell
Created February 6, 2012 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mwmitchell/1755054 to your computer and use it in GitHub Desktop.
Save mwmitchell/1755054 to your computer and use it in GitHub Desktop.
(facts "/locations/:id/rates should limit the rate response count by the :limit param"
(let [limit 3
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