mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-22 08:21:14 +00:00
Add test for r17329 (#28494).
Patch by Tomomi Yuzuriha. git-svn-id: http://svn.redmine.org/redmine/trunk@17330 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ea92353978
commit
b68e141d66
@ -95,6 +95,13 @@ class IssuePriorityTest < ActiveSupport::TestCase
|
|||||||
assert_equal 'highest', IssuePriority.active.order(:position).last.position_name
|
assert_equal 'highest', IssuePriority.active.order(:position).last.position_name
|
||||||
end
|
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
|
def test_destroying_a_priority_should_update_position_names
|
||||||
IssuePriority.find_by_position_name('highest').destroy
|
IssuePriority.find_by_position_name('highest').destroy
|
||||||
assert_equal %w(lowest default high2 highest), IssuePriority.active.to_a.sort.map(&:position_name)
|
assert_equal %w(lowest default high2 highest), IssuePriority.active.to_a.sort.map(&:position_name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user