spec/api_spec.rb in ptv_timetable-0.0.1 vs spec/api_spec.rb in ptv_timetable-0.0.2
- old
+ new
@@ -21,11 +21,17 @@
subject.near_me(-37.82392124423254, 144.9462017431463)
stub.should have_been_requested
end
it 'can find points of interest' do
- stub = stub_request(:get, "http://timetableapi.ptv.vic.gov.au/v2/poi/0,1,2,3,4,100/lat1/-37.82205143151239/long1/144.9779160007277/lat2/-37.81393456848758/long2/-37.81393456848758/griddepth/3/limit/6?devid=devid&signature=F94A5E7774028E67B6684B17E1C49886C5BEFBC9")
+ stub = stub_request(:get, "http://timetableapi.ptv.vic.gov.au/v2/poi/0,1,2,3,4,100/lat1/-37.82205143151239/long1/144.9779160007277/lat2/-37.81393456848758/long2/144.9859159992726/griddepth/0/limit/30?devid=devid&signature=02B931B1374991FD58789AA08B31D12AD57E8FB0")
subject.points_of_interest(-37.82205143151239, 144.9779160007277, -37.81393456848758, 144.9859159992726)
+ stub.should have_been_requested
+ end
+
+ it 'can find just ticket outlets as a points of interest' do
+ stub = stub_request(:get, "http://timetableapi.ptv.vic.gov.au/v2/poi/100/lat1/-37.82205143151239/long1/144.9779160007277/lat2/-37.81393456848758/long2/144.9859159992726/griddepth/0/limit/30?devid=devid&signature=C619E84578022C947AC3EFB45129B76DE65C681E")
+ subject.points_of_interest(-37.82205143151239, 144.9779160007277, -37.81393456848758, 144.9859159992726, PtvTimetable::TICKET_OUTLET)
stub.should have_been_requested
end
it 'can perform a general search' do
stub = stub_request(:get, "http://timetableapi.ptv.vic.gov.au/v2/search/Alamein?devid=devid&signature=17E15574BF165335DD054E02FC5F8C5C33189262")