Project

General

Profile

Defect #40860 » test-for-40860.patch

Go MAEDA, 2024-06-20 13:39

View differences:

test/unit/issue_test.rb
83 83
    assert_save issue
84 84
  end
85 85

  
86
  def test_create_with_no_priority_defined
87
    IssuePriority.delete_all
88
    issue = Issue.new(
89
      project_id: 1, tracker_id: 1, author_id: 3, subject: 'test_create_with_no_priority_defined'
90
    )
91

  
92
    assert_nothing_raised {issue.save}
93
    assert_include 'Priority cannot be blank', issue.errors.full_messages
94
  end
95

  
86 96
  def test_default_priority_should_be_set_when_priority_field_is_disabled
87 97
    tracker = Tracker.find(1)
88 98
    tracker.core_fields = tracker.core_fields - ['priority_id']
(2-2/2)