Replaces Enumeration.get_values and Enumeration.default with named scopes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2472 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-02-15 13:33:09 +00:00
parent 13e2c727cf
commit 4601ed2f3a
17 changed files with 51 additions and 39 deletions
+2 -2
View File
@@ -640,7 +640,7 @@ class IssuesControllerTest < Test::Unit::TestCase
:id => 1,
:issue => { :status_id => 2, :assigned_to_id => 3 },
:notes => 'Assigned to dlopper',
:time_entry => { :hours => '', :comments => '', :activity_id => Enumeration.get_values('ACTI').first }
:time_entry => { :hours => '', :comments => '', :activity_id => Enumeration.activities.first }
end
assert_redirected_to :action => 'show', :id => '1'
issue.reload
@@ -676,7 +676,7 @@ class IssuesControllerTest < Test::Unit::TestCase
post :edit,
:id => 1,
:notes => '2.5 hours added',
:time_entry => { :hours => '2.5', :comments => '', :activity_id => Enumeration.get_values('ACTI').first }
:time_entry => { :hours => '2.5', :comments => '', :activity_id => Enumeration.activities.first }
end
assert_redirected_to :action => 'show', :id => '1'