Skip to content

Instantly share code, notes, and snippets.

@bbenezech
Created November 7, 2014 09:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbenezech/ba0edffa516e6c8323f7 to your computer and use it in GitHub Desktop.
Save bbenezech/ba0edffa516e6c8323f7 to your computer and use it in GitHub Desktop.
(Benoit Benezech 2014-10-27 16:17:33 +0100 177) it "returns the availability and correct prices" do
(Benoit Benezech 2014-10-27 16:17:33 +0100 178) get :extension_availability, id: @rental.id, format: :json, end_date: (@rental.ends_at + 3.days).strftime("%d/%m/%Y"), end_time: "am", distance: '10'
(Valentin Rabanelly 2013-06-03 15:51:01 +0200 179) parsed_body = JSON.parse(response.body)
(Michael Bensoussan 2014-06-23 11:11:51 +0200 180) expect(parsed_body["availability"]["available"]).to be true
(Marc G Gauthier 2013-09-23 12:38:14 +0200 181) expected_message = t("cars.availability.messages.#{status.info}")
(Alexandru Keszeg 2013-07-31 18:40:46 +0300 182) expect(parsed_body["availability"]["message"]).to eq(expected_message)
(Benoit Benezech 2014-10-27 16:17:33 +0100 183) expect(parsed_body["charges"]["rental_price"]["total"]).to eq(61.1)
(Nicolas Mondollot 2013-06-09 16:34:56 +0200 184) end
@bbenezech
Copy link
Author

Teamwork...

@mickey
Copy link

mickey commented Nov 7, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment