From 9b576d7d0ab625e0c51e36a91470435b010dca06 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Mar 2012 12:50:19 +0000 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 --- test/functional/enumerations_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index ee783ab9c..4b203a4dd 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