提交 55dec5a7 编写于 作者: C Carlos Antonio da Silva

Move where with blank conditions test to the correct where tests file

This test does not belong to has many associations test.
上级 6ba0f975
......@@ -298,12 +298,6 @@ def test_finding_array_compatibility
assert_equal 2, Firm.order(:id).find{|f| f.id > 0}.clients.length
end
def test_find_with_blank_conditions
[[], {}, nil, ""].each do |blank|
assert_equal 2, Firm.all.merge!(:order => "id").first.clients.where(blank).to_a.size
end
end
def test_find_many_with_merged_options
assert_equal 1, companies(:first_firm).limited_clients.size
assert_equal 1, companies(:first_firm).limited_clients.to_a.size
......
......@@ -85,5 +85,11 @@ def test_where_with_table_name_and_empty_hash
def test_where_with_empty_hash_and_no_foreign_key
assert_equal 0, Edge.where(:sink => {}).count
end
def test_where_with_blank_conditions
[[], {}, nil, ""].each do |blank|
assert_equal 4, Edge.where(blank).order("sink_id").to_a.size
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册