where makes bind values, so stop manually creating them

This commit is contained in:
Aaron Patterson 2014-01-14 11:56:05 -08:00
parent c65cfd7648
commit b5f679b51a

@ -1553,17 +1553,9 @@ def test_merging_keeps_lhs_bind_parameters
end
def test_merging_reorders_bind_params
post = Post.first
id_column = Post.columns_hash['id']
title_column = Post.columns_hash['title']
bv = Post.connection.substitute_at id_column, 0
right = Post.where(id: bv)
right.bind_values += [[id_column, post.id]]
left = Post.where(title: bv)
left.bind_values += [[title_column, post.title]]
post = Post.first
right = Post.where(id: post.id)
left = Post.where(title: post.title)
merged = left.merge(right)
assert_equal post, merged.first