mirror of
https://github.com/lloeki/rebel.git
synced 2025-12-06 01:54:40 +01:00
fix hash clause handling
This commit is contained in:
parent
d538a9b584
commit
8a9b5804fc
2 changed files with 2 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ class TestRaw < Minitest::Test
|
|||
end
|
||||
|
||||
def test_where
|
||||
assert_str_equal(Rebel::SQL.where?(foo: 1, bar: 2, baz: 3), 'WHERE "foo" = 1 AND "bar" = 2 AND "baz" = 3')
|
||||
assert_str_equal(Rebel::SQL.where?(Rebel::SQL.name(:foo).eq(1).or(Rebel::SQL.name(:bar).eq(2)), Rebel::SQL.name(:baz).eq(3)), 'WHERE ("foo" = 1 OR "bar" = 2) AND "baz" = 3')
|
||||
assert_str_equal(Rebel::SQL.where?(Rebel::SQL.name(:foo).eq(1).or(Rebel::SQL.name(:bar).eq(2))), 'WHERE "foo" = 1 OR "bar" = 2')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue