aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_test.rb
diff options
context:
space:
mode:
authorRainerBlessing <rainer.blessing@googlemail.com>2010-08-03 20:37:46 +0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-03 21:08:43 -0300
commit7e4e1f0ca5722008b288224221405eba486345c1 (patch)
tree960e181e44f31ba9f01cc66c5196efe4035277f9 /activerecord/test/cases/finder_test.rb
parent02a5842cd09bd75de4c2fdb6b474c6c0ff163ebf (diff)
downloadrails-7e4e1f0ca5722008b288224221405eba486345c1.tar.gz
rails-7e4e1f0ca5722008b288224221405eba486345c1.tar.bz2
rails-7e4e1f0ca5722008b288224221405eba486345c1.zip
query value is converted to_s instead of to_yaml
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index a107c1a474..4f3e43d77d 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -693,6 +693,14 @@ class FinderTest < ActiveRecord::TestCase
assert_equal [], Topic.find_all_by_title("The First Topic!!")
end
+ def test_find_all_by_one_attribute_which_is_a_symbol
+ topics = Topic.find_all_by_content("Have a nice day".to_sym)
+ assert_equal 2, topics.size
+ assert topics.include?(topics(:first))
+
+ assert_equal [], Topic.find_all_by_title("The First Topic!!")
+ end
+
def test_find_all_by_one_attribute_that_is_an_aggregate
balance = customers(:david).balance
assert_kind_of Money, balance