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

Ticket #10254: activerecord_calculations_from_test.diff

File activerecord_calculations_from_test.diff, 0.6 kB (added by michaelboutros, 9 months ago)
  • activerecord/test/calculations_test.rb

    old new  
    248248  def test_count_with_too_many_parameters_raises 
    249249    assert_raise(ArgumentError) { Account.count(1, 2, 3) } 
    250250  end 
     251   
     252  def test_count_with_valid_from_option 
     253    assert_equal 6, Account.count(:distinct => true, :include => :firm, :from => 'accounts') 
     254    assert_equal 4, Account.count(:distinct => true, :include => :firm, :select => :credit_limit, :from => 'accounts') 
     255  end 
    251256end