提交 081eed35 编写于 作者: M Michael Koziarski

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
上级 d4daf7bb
......@@ -126,8 +126,9 @@ def test_eager_association_loading_with_belongs_to_and_conditions_string_with_un
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 @@ def test_eager_association_loading_with_belongs_to_and_order_string_with_unquote
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册