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
This commit is contained in:
Jean-Philippe Lang 2012-03-04 12:50:19 +00:00
parent 45e2e57afb
commit 9b576d7d0a
1 changed files with 2 additions and 2 deletions

View File

@ -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