From 9b576d7d0ab625e0c51e36a91470435b010dca06 2012-03-04 12:50:19 From: Jean-Philippe Lang Date: 2012-03-04 12:50:19 Subject: [PATCH] Rails3: :order option has no effect here because of the default_scope on Enumeration. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9084 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index ee783ab..4b203a4 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -49,8 +49,8 @@ class EnumerationsControllerTest < ActionController::TestCase post :create, :enumeration => {:type => 'IssuePriority', :name => 'Lowest'} end assert_redirected_to '/enumerations?type=IssuePriority' - e = IssuePriority.first(:order => 'id DESC') - assert_equal 'Lowest', e.name + e = IssuePriority.find_by_name('Lowest') + assert_not_nil e end def test_create_with_failure