summaryrefslogtreecommitdiffstats
path: root/test/functional/enumerations_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 12:50:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 12:50:19 +0000
commit9b576d7d0ab625e0c51e36a91470435b010dca06 (patch)
tree4cd585588dcb182a7bdb60686efcf7dd3a02d90a /test/functional/enumerations_controller_test.rb
parent45e2e57afbdceb7faf52f387886b2ba6771bdc48 (diff)
downloadredmine-9b576d7d0ab625e0c51e36a91470435b010dca06.tar.gz
redmine-9b576d7d0ab625e0c51e36a91470435b010dca06.zip
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
Diffstat (limited to 'test/functional/enumerations_controller_test.rb')
-rw-r--r--test/functional/enumerations_controller_test.rb4
1 files 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