spec/requests/labs_spec.rb in medivo-0.1.24 vs spec/requests/labs_spec.rb in medivo-0.1.25

- old
+ new

@@ -26,7 +26,30 @@ page.body.should match /465 N ROXBURY DR STE 715, BEVERLY HILLS, CA/i page.body.should match /8737 BEVERLY BLVD STE 401, LOS ANGELES, CA/i end end + describe "making appointments" do + + before do + @lab_code = "20060" + @date = "11/01/2011" + @am_pm = '' + end + + it "/labs/appointments returns appointment data as json" do + body = {'time'=> ["11/03/2011|08:30 AM", "11/04/2011|08:30 AM"]} + stub(Medivo::Appointment).find(@lab_code, @date, nil) { body } + visit Medivo::Engine.routes.url_helpers.data_appointments_path :lab_code=>@lab_code, :appointment_date=>@date + page.body.should match "08:30 AM" + end + + #it "/labs/appointments returns appointment data as json", :js=>true, :driver=>:selenium_chrome do + # body = {'time'=> ["11/03/2011|08:30 AM", "11/04/2011|08:30 AM"]} + # stub(Medivo::Appointment).find(@lab_code, @date, nil) { body } + # visit Medivo::Engine.routes.url_helpers.data_appointments_path :lab_code=>@lab_code, :appointment_date=>@date + # page.body.should match "08:30 AM" + #end + end + end