aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/reflection_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-03-05 22:07:30 +0000
committerJon Leighton <j@jonathanleighton.com>2011-03-05 22:07:30 +0000
commit7fddb942624478a23173dfa379f7ade6a0fc9218 (patch)
treebca8fd4125105ff26f1e4cafba432760d8897d44 /activerecord/test/cases/reflection_test.rb
parentddf83d14f1c7ddae07a285a8ad7c45f652edc843 (diff)
downloadrails-7fddb942624478a23173dfa379f7ade6a0fc9218.tar.gz
rails-7fddb942624478a23173dfa379f7ade6a0fc9218.tar.bz2
rails-7fddb942624478a23173dfa379f7ade6a0fc9218.zip
Push source_type and polymorphic conditions out of ThroughAssociation and JoinDependency::JoinAssociation and into the reflection instead.
Diffstat (limited to 'activerecord/test/cases/reflection_test.rb')
-rw-r--r--activerecord/test/cases/reflection_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb
index 9529ae56b8..baaa08a359 100644
--- a/activerecord/test/cases/reflection_test.rb
+++ b/activerecord/test/cases/reflection_test.rb
@@ -216,7 +216,7 @@ class ReflectionTest < ActiveRecord::TestCase
def test_through_conditions
expected = [
["tags.name = 'Blue'"],
- ["taggings.comment = 'first'"],
+ ["taggings.comment = 'first'", {"taggable_type"=>"Post"}],
["posts.title LIKE 'misc post%'"]
]
actual = Author.reflect_on_association(:misc_post_first_blue_tags).through_conditions
@@ -224,7 +224,7 @@ class ReflectionTest < ActiveRecord::TestCase
expected = [
["tags.name = 'Blue'", "taggings.comment = 'first'", "posts.title LIKE 'misc post%'"],
- [],
+ [{"taggable_type"=>"Post"}],
[]
]
actual = Author.reflect_on_association(:misc_post_first_blue_tags_2).through_conditions