spec/requests/labs_spec.rb in medivo-0.2.19 vs spec/requests/labs_spec.rb in medivo-0.2.20
- old
+ new
@@ -27,15 +27,16 @@
describe "finding appointments" do
before do
@lab_code = "20060"
- @date = "11/01/2011"
+ @date_str = "11/01/2011"
+ @date = Date.strptime(@date_str, "%m/%d/%Y")
@am_pm = nil
end
let(:path) {
- Medivo::Engine.routes.url_helpers.find_appointment_labs_path lab_code: @lab_code, date: @date
+ Medivo::Engine.routes.url_helpers.find_appointment_labs_path lab_code: @lab_code, date: @date_str
}
it "valid request returns appointment times as json" do
body = {'time'=> ["11/03/2011|08:30 AM", "11/04/2011|08:30 AM"]}
mock(Medivo::Appointment).find(@lab_code, @date, @am_pm) { body }