aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-07 01:00:33 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-07 01:08:38 -0200
commit55dec5a7da3e0bed51b1a37d152df9c7395e5a80 (patch)
tree2c2f3e3882be8adccebcab6cee9b016f1c343c1d /activerecord/test/cases/relation
parent6ba0f975d5d2867f80bcf8a809b1337c8f369383 (diff)
downloadrails-55dec5a7da3e0bed51b1a37d152df9c7395e5a80.tar.gz
rails-55dec5a7da3e0bed51b1a37d152df9c7395e5a80.tar.bz2
rails-55dec5a7da3e0bed51b1a37d152df9c7395e5a80.zip
Move where with blank conditions test to the correct where tests file
This test does not belong to has many associations test.
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r--activerecord/test/cases/relation/where_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb
index 9c0b139dbf..297e865308 100644
--- a/activerecord/test/cases/relation/where_test.rb
+++ b/activerecord/test/cases/relation/where_test.rb
@@ -85,5 +85,11 @@ module ActiveRecord
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