From 74ccf34361908dd17d70848bd770d166f44c96b7 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 10:11:00 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#first with finder options at IssueCategoryTest git-svn-id: http://svn.redmine.org/redmine/trunk@12525 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_category_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/issue_category_test.rb b/test/unit/issue_category_test.rb index 39370be1a..5d1db51ae 100644 --- a/test/unit/issue_category_test.rb +++ b/test/unit/issue_category_test.rb @@ -26,13 +26,13 @@ class IssueCategoryTest < ActiveSupport::TestCase def test_create assert IssueCategory.new(:project_id => 2, :name => 'New category').save - category = IssueCategory.first(:order => 'id DESC') + category = IssueCategory.order('id DESC').first assert_equal 'New category', category.name end def test_create_with_group_assignment assert IssueCategory.new(:project_id => 2, :name => 'Group assignment', :assigned_to_id => 11).save - category = IssueCategory.first(:order => 'id DESC') + category = IssueCategory.order('id DESC').first assert_kind_of Group, category.assigned_to assert_equal Group.find(11), category.assigned_to end