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

Ticket #9640: test-order.patch

File test-order.patch, 1.0 kB (added by Aleksey Kondratenko, 4 months ago)

failing test with symbol arg to :order option

  • a/activerecord/test/associations_test.rb

    old new  
    2121  fixtures :accounts, :companies, :developers, :projects, :developers_projects, 
    2222           :computers 
    2323 
     24  def test_include_with_order_works 
     25    assert_nothing_raised {Account.find(:first, :order => 'id', :include => :firm)} 
     26    assert_nothing_raised {Account.find(:first, :order => :id, :include => :firm)} 
     27  end 
     28 
    2429  def test_bad_collection_keys 
    2530    assert_raise(ArgumentError, 'ActiveRecord should have barked on bad collection keys') do 
    2631      Class.new(ActiveRecord::Base).has_many(:wheels, :name => 'wheels')