aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/reflection_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-03-16 18:54:34 +0000
committerJon Leighton <j@jonathanleighton.com>2011-03-16 18:54:34 +0000
commit9abc94c44516afdcfe4a3b202c336c9578fd6d0d (patch)
treec6af8dd568ec7bbd522c91c16b704e184e250968 /activerecord/test/cases/reflection_test.rb
parent37d93ea16046add35fecd8c279e868869ee744a5 (diff)
downloadrails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.tar.gz
rails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.tar.bz2
rails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.zip
oracle, y u defy me
Diffstat (limited to 'activerecord/test/cases/reflection_test.rb')
-rw-r--r--activerecord/test/cases/reflection_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb
index 918bc0a842..97d9669483 100644
--- a/activerecord/test/cases/reflection_test.rb
+++ b/activerecord/test/cases/reflection_test.rb
@@ -215,16 +215,16 @@ class ReflectionTest < ActiveRecord::TestCase
def test_conditions
expected = [
- ["tags.name = 'Blue'"],
- ["taggings.comment = 'first'", {"taggable_type"=>"Post"}],
- ["posts.title LIKE 'misc post%'"]
+ [{ :tags => { :name => 'Blue' } }],
+ [{ :taggings => { :comment => 'first' } }, { "taggable_type" => "Post" }],
+ [{ :posts => { :title => ['misc post by bob', 'misc post by mary'] } }]
]
actual = Author.reflect_on_association(:misc_post_first_blue_tags).conditions
assert_equal expected, actual
expected = [
- ["tags.name = 'Blue'", "taggings.comment = 'first'", "posts.title LIKE 'misc post%'"],
- [{"taggable_type"=>"Post"}],
+ [{ :tags => { :name => 'Blue' } }, { :taggings => { :comment => 'first' } }, { :posts => { :title => ['misc post by bob', 'misc post by mary'] } }],
+ [{ "taggable_type" => "Post" }],
[]
]
actual = Author.reflect_on_association(:misc_post_first_blue_tags_2).conditions