Browse Source

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
tags/2.5.0
Toshi MARUYAMA 10 years ago
parent
commit
74ccf34361
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      test/unit/issue_category_test.rb

+ 2
- 2
test/unit/issue_category_test.rb View File

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

Loading…
Cancel
Save