diff options
author | Go MAEDA <maeda@farend.jp> | 2024-09-11 07:32:07 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-09-11 07:32:07 +0000 |
commit | 1a70514aeb2e5cd22c950726bb0270b0405a8031 (patch) | |
tree | 92d182e87e85da3ef2fe453912489388499dbaff /test/unit/issue_test.rb | |
parent | 6b736fe5331e5fdff9cde07d915f26137bccef75 (diff) | |
download | redmine-1a70514aeb2e5cd22c950726bb0270b0405a8031.tar.gz redmine-1a70514aeb2e5cd22c950726bb0270b0405a8031.zip |
Merged r23048 from trunk to 5.1-stable (#8539).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23049 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-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 3be86a1a4..7f6485650 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -2202,6 +2202,16 @@ class IssueTest < ActiveSupport::TestCase assert !blocking_issue.blocked? end + def test_blocked_should_not_raise_exception_when_blocking_issue_id_is_invalid + ir = IssueRelation.find_by(issue_from_id: 10, issue_to_id: 9, relation_type: 'blocks') + issue = Issue.find(9) + assert issue.blocked? + + ir.update_column :issue_from_id, 0 # invalid issue id + issue.reload + assert_nothing_raised {assert_not issue.blocked?} + end + def test_blocked_issues_dont_allow_closed_statuses blocked_issue = Issue.find(9) |