Skip to content

Commit

Permalink
Add more hash tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Feb 4, 2025
1 parent 3595cbd commit 79b3f7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/classes/query_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ def test_validate_params_order
def test_validate_params_hashes
box = { north: 48.5798, south: 48.558, east: -123.4307, west: -123.4763 }
assert_equal(box, Query.lookup(:Location, in_box: box).params[:in_box])
assert_raises(TypeError) { Query.lookup(:Location, in_box: "one") }
box = { north: "with", south: 48.558, east: -123.4307, west: -123.4763 }
assert_raises(RuntimeError) { Query.lookup(:Location, in_box: box) }
box = { south: 48.558, east: -123.4307, west: -123.4763 }
assert_raises(RuntimeError) { Query.lookup(:Location, in_box: box) }
end

def test_initialize_helpers
Expand Down

0 comments on commit 79b3f7c

Please sign in to comment.