diff options
author | Go MAEDA <maeda@farend.jp> | 2018-05-12 03:33:05 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-05-12 03:33:05 +0000 |
commit | b68e141d6602ea6eadf39b6ed9fc3870d6970889 (patch) | |
tree | 060ab317d1ffde47d161101d92069313703078cf | |
parent | ea92353978fc907a669aff3186d1809a4aabf3f2 (diff) | |
download | redmine-b68e141d6602ea6eadf39b6ed9fc3870d6970889.tar.gz redmine-b68e141d6602ea6eadf39b6ed9fc3870d6970889.zip |
Add test for r17329 (#28494).
Patch by Tomomi Yuzuriha.
git-svn-id: http://svn.redmine.org/redmine/trunk@17330 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/unit/issue_priority_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/issue_priority_test.rb b/test/unit/issue_priority_test.rb index 19ee8072c..0617506f1 100644 --- a/test/unit/issue_priority_test.rb +++ b/test/unit/issue_priority_test.rb @@ -95,6 +95,13 @@ class IssuePriorityTest < ActiveSupport::TestCase assert_equal 'highest', IssuePriority.active.order(:position).last.position_name end + def test_changing_default_priority_should_update_position_names + prio = IssuePriority.first + prio.is_default = true + prio.save + assert_equal %w(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.to_a.sort.map(&:position_name) |