Skip to content

Commit

Permalink
Geography search spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiuhl committed Sep 17, 2013
1 parent cf23bb8 commit a68689f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,11 @@
})
end
end

describe "geography searching" do
it "builds a proper query string" do
HTTParty.should_receive(:get).with("http://search-testdomain.us-east-1.cloudsearch.amazonaws.com/2011-02-01/search?q=nom&bq=%28or+is_donut%3A%27true%27%28and+fried%3A%27true%27%29%29&size=10")
@asari.search filter: { and: Asari::Geography.coordinate_box(meters: 5000, lat: 45.52, lng: 122.6819) }
end
end
end

0 comments on commit a68689f

Please sign in to comment.