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:
parent
45e2e57afb
commit
9b576d7d0a
|
@ -49,8 +49,8 @@ class EnumerationsControllerTest < ActionController::TestCase
|
||||||
post :create, :enumeration => {:type => 'IssuePriority', :name => 'Lowest'}
|
post :create, :enumeration => {:type => 'IssuePriority', :name => 'Lowest'}
|
||||||
end
|
end
|
||||||
assert_redirected_to '/enumerations?type=IssuePriority'
|
assert_redirected_to '/enumerations?type=IssuePriority'
|
||||||
e = IssuePriority.first(:order => 'id DESC')
|
e = IssuePriority.find_by_name('Lowest')
|
||||||
assert_equal 'Lowest', e.name
|
assert_not_nil e
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_with_failure
|
def test_create_with_failure
|
||||||
|
|
Loading…
Reference in New Issue