]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at IssueCategoriesContr...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:31 +0000 (04:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 04:32:31 +0000 (04:32 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12509 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issue_categories_controller_test.rb

index 825408165b8910a41dbd00ef9154a83363d897c4..5c508351f12e09d69d613a4c9fb56ccedae4bcc6 100644 (file)
@@ -66,7 +66,7 @@ class IssueCategoriesControllerTest < ActionController::TestCase
     assert_difference 'IssueCategory.count' do
       xhr :post, :create, :project_id => '1', :issue_category => {:name => 'New category'}
     end
-    category = IssueCategory.first(:order => 'id DESC')
+    category = IssueCategory.order('id DESC').first
     assert_equal 'New category', category.name
 
     assert_response :success