From 2d1866d966d94c688f9cb87c5bf3f096dffac844 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 22 Oct 2014 17:37:16 +0000 Subject: Merged rails-4.1 branch (#14534). git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_priority_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/unit/issue_priority_test.rb') diff --git a/test/unit/issue_priority_test.rb b/test/unit/issue_priority_test.rb index f9c0c9793..7c4a38061 100644 --- a/test/unit/issue_priority_test.rb +++ b/test/unit/issue_priority_test.rb @@ -83,7 +83,7 @@ class IssuePriorityTest < ActiveSupport::TestCase IssuePriority.clear_position_names IssuePriority.compute_position_names - assert_equal %w(lowest default high3 high2 highest), IssuePriority.active.all.sort.map(&:position_name) + assert_equal %w(lowest default high3 high2 highest), IssuePriority.active.to_a.sort.map(&:position_name) end def test_compute_position_names_without_default_priority_should_split_priorities @@ -91,16 +91,16 @@ class IssuePriorityTest < ActiveSupport::TestCase IssuePriority.update_all :is_default => false IssuePriority.compute_position_names - assert_equal %w(lowest low2 default high2 highest), IssuePriority.active.all.sort.map(&:position_name) + assert_equal %w(lowest low2 default high2 highest), IssuePriority.active.to_a.sort.map(&:position_name) end def test_adding_a_priority_should_update_position_names priority = IssuePriority.create!(:name => 'New') - assert_equal %w(lowest default high4 high3 high2 highest), IssuePriority.active.all.sort.map(&:position_name) + assert_equal %w(lowest default high4 high3 high2 highest), IssuePriority.active.to_a.sort.map(&:position_name) end def test_destroying_a_priority_should_update_position_names IssuePriority.find_by_position_name('highest').destroy - assert_equal %w(lowest default high2 highest), IssuePriority.active.all.sort.map(&:position_name) + assert_equal %w(lowest default high2 highest), IssuePriority.active.to_a.sort.map(&:position_name) end end -- cgit v1.2.3