spec/schoolfinder/client_spec.rb in schoolfinder-0.4.2 vs spec/schoolfinder/client_spec.rb in schoolfinder-0.4.3
- old
+ new
@@ -55,9 +55,24 @@
@response.should_not be_nil
@response.body.should be_kind_of(Array)
@response.body.first.should be_kind_of(Hashie::Rash)
end
end
+
+ context "assigned_district" do
+ before do
+ mock_get({"f" => "getAssignedDistrict", "latitude" => "42.34", "longitude" => "-71.05"}, 'assigned_district.json')
+ end
+
+ it { lambda {@schoolfinder.assigned_district(:latitude => "42.34", :longitude => "-71.05")}.should_not raise_exception }
+
+ it "should return a response" do
+ @response = @schoolfinder.assigned_district(:latitude => "42.34", :longitude => "-71.05")
+ @response.should_not be_nil
+ @response.body.should be_kind_of(Array)
+ @response.body.first.should be_kind_of(Hashie::Rash)
+ end
+ end
context "test_rating" do
before do
mock_get({"f" => "getTestRating", "nces_id" => "061029001146"}, 'test_rating.json')
end