Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8857

Show
Ignore:
Timestamp:
02/11/08 07:24:25 (3 months ago)
Author:
nzkoz
Message:

Fix the pre-quoted table names in the eager tests. [mislav]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/test/cases/associations/eager_test.rb

    r8856 r8857  
    127127 
    128128  def test_eager_association_loading_with_belongs_to_and_conditions_string_with_quoted_table_name 
     129    quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') 
    129130    assert_nothing_raised do 
    130       Comment.find(:all, :include => :post, :conditions => ["#{Comment.connection.quote_table_name('posts.id')} = ?",4]) 
     131      Comment.find(:all, :include => :post, :conditions => ["#{quoted_posts_id} = ?",4]) 
    131132    end 
    132133  end 
     
    139140 
    140141  def test_eager_association_loading_with_belongs_to_and_order_string_with_quoted_table_name 
     142    quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') 
    141143    assert_nothing_raised do 
    142       Comment.find(:all, :include => :post, :order => Comment.connection.quote_table_name('posts.id')
     144      Comment.find(:all, :include => :post, :order => quoted_posts_id
    143145    end 
    144146  end