diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-11 07:24:25 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-11 07:24:25 +0000 |
commit | 081eed352fb7c16cbe1a18e13d032aa3512b04cd (patch) | |
tree | 3d694bda9b8b311299e5cbe9050094ea1bb798d0 /activerecord/test/cases | |
parent | d4daf7bba7dda756ab4700016e9b4b31f6127a1e (diff) | |
download | rails-081eed352fb7c16cbe1a18e13d032aa3512b04cd.tar.gz rails-081eed352fb7c16cbe1a18e13d032aa3512b04cd.tar.bz2 rails-081eed352fb7c16cbe1a18e13d032aa3512b04cd.zip |
Fix the pre-quoted table names in the eager tests. [mislav]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index c95099c146..a4fd71abea 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -126,8 +126,9 @@ class EagerAssociationTest < ActiveRecord::TestCase end def test_eager_association_loading_with_belongs_to_and_conditions_string_with_quoted_table_name + quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') assert_nothing_raised do - Comment.find(:all, :include => :post, :conditions => ["#{Comment.connection.quote_table_name('posts.id')} = ?",4]) + Comment.find(:all, :include => :post, :conditions => ["#{quoted_posts_id} = ?",4]) end end @@ -138,8 +139,9 @@ class EagerAssociationTest < ActiveRecord::TestCase end def test_eager_association_loading_with_belongs_to_and_order_string_with_quoted_table_name + quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') assert_nothing_raised do - Comment.find(:all, :include => :post, :order => Comment.connection.quote_table_name('posts.id')) + Comment.find(:all, :include => :post, :order => quoted_posts_id) end end |