提交 3ad0779e 编写于 作者: A Aaron Patterson

testing combined nodes are not traversed

上级 795dc3d1
......@@ -80,6 +80,15 @@ def test_values_wrong_table
assert_equal({}, relation.where_values_hash)
end
def test_tree_is_not_traversed
relation = Relation.new Post, Post.arel_table
left = relation.table[:id].eq(10)
right = relation.table[:id].eq(10)
combine = left.and right
relation.where_values << combine
assert_equal({}, relation.where_values_hash)
end
def test_table_name_delegates_to_klass
relation = Relation.new FakeKlass.new('foo'), :b
assert_equal 'foo', relation.table_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册