diff options
author | Go MAEDA <maeda@farend.jp> | 2024-06-25 02:15:35 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-06-25 02:15:35 +0000 |
commit | 61eeefb7dc78cbc7011a139c18044f536d02d273 (patch) | |
tree | 072f810876827005db8b224081558f87cc155079 /test | |
parent | b5078e314a97ce66bf2e712a66c24d87b7722d60 (diff) | |
download | redmine-61eeefb7dc78cbc7011a139c18044f536d02d273.tar.gz redmine-61eeefb7dc78cbc7011a139c18044f536d02d273.zip |
Add test for r22895 (#40860).
git-svn-id: https://svn.redmine.org/redmine/trunk@22896 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/issue_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 21a295aa1..b35bf97a4 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -83,6 +83,16 @@ class IssueTest < ActiveSupport::TestCase assert_save issue end + def test_create_with_no_priority_defined + IssuePriority.delete_all + issue = Issue.new( + project_id: 1, tracker_id: 1, author_id: 3, subject: 'test_create_with_no_priority_defined' + ) + + assert_nothing_raised {assert_not issue.save} + assert_include 'Priority cannot be blank', issue.errors.full_messages + end + def test_default_priority_should_be_set_when_priority_field_is_disabled tracker = Tracker.find(1) tracker.core_fields = tracker.core_fields - ['priority_id'] |