aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-02-08 16:53:49 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-02-08 16:53:49 -0500
commit29f3a036e7ab5199b8a793bfab6454802eaec1b3 (patch)
tree24d21169ac3b811ec4ce6aa6a08492e603ac2e1e /activerecord/test
parentb5645d02731f662ec5a15a1c99e3e6127e7b0398 (diff)
downloadrails-29f3a036e7ab5199b8a793bfab6454802eaec1b3.tar.gz
rails-29f3a036e7ab5199b8a793bfab6454802eaec1b3.tar.bz2
rails-29f3a036e7ab5199b8a793bfab6454802eaec1b3.zip
Reverting e170014113 (Change behaviour with empty hash in where clause)
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relation/where_test.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb
index 8c8f4267a9..53cdf89b1f 100644
--- a/activerecord/test/cases/relation/where_test.rb
+++ b/activerecord/test/cases/relation/where_test.rb
@@ -92,9 +92,7 @@ module ActiveRecord
end
def test_where_with_table_name_and_empty_hash
- assert_raises(ArgumentError) do
- Post.where(:posts => {})
- end
+ assert_equal 0, Post.where(:posts => {}).count
end
def test_where_with_table_name_and_empty_array
@@ -102,9 +100,7 @@ module ActiveRecord
end
def test_where_with_empty_hash_and_no_foreign_key
- assert_raises(ArgumentError) do
- Edge.where(:sink => {}).count
- end
+ assert_equal 0, Edge.where(:sink => {}).count
end
def test_where_with_blank_conditions