aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-01-16 21:14:34 +0000
committerJon Leighton <j@jonathanleighton.com>2012-01-16 21:32:12 +0000
commita2dab46cae35a06fd5c5500037177492a047c252 (patch)
treeaf4be28070368eccdc1151df59384c9ca7aee1bf /activerecord/test/cases/relations_test.rb
parent46ea4442f3abc33d15e03487bae1c80346eab49a (diff)
downloadrails-a2dab46cae35a06fd5c5500037177492a047c252.tar.gz
rails-a2dab46cae35a06fd5c5500037177492a047c252.tar.bz2
rails-a2dab46cae35a06fd5c5500037177492a047c252.zip
Deprecate inferred JOINs with includes + SQL snippets.
See the CHANGELOG for details. Fixes #950.
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 6d75f31f35..5e19465253 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -184,12 +184,12 @@ class RelationTest < ActiveRecord::TestCase
end
def test_finding_with_complex_order_and_limit
- tags = Tag.includes(:taggings).order("REPLACE('abc', taggings.taggable_type, taggings.taggable_type)").limit(1).to_a
+ tags = Tag.includes(:taggings).references(:taggings).order("REPLACE('abc', taggings.taggable_type, taggings.taggable_type)").limit(1).to_a
assert_equal 1, tags.length
end
def test_finding_with_complex_order
- tags = Tag.includes(:taggings).order("REPLACE('abc', taggings.taggable_type, taggings.taggable_type)").to_a
+ tags = Tag.includes(:taggings).references(:taggings).order("REPLACE('abc', taggings.taggable_type, taggings.taggable_type)").to_a
assert_equal 3, tags.length
end
@@ -1104,7 +1104,9 @@ class RelationTest < ActiveRecord::TestCase
)
)
- assert scope.eager_loading?
+ assert_deprecated do
+ assert scope.eager_loading?
+ end
end
def test_ordering_with_extra_spaces