diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
commit | 2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch) | |
tree | 7a733c1cc51448ab69b3f892285305dbfb0ae15e /test/unit/issue_priority_test.rb | |
parent | a6ec78a4dc658e3517ed682792016b6530458696 (diff) | |
download | redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip |
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_priority_test.rb')
-rw-r--r-- | test/unit/issue_priority_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |