mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 20:26:19 +02:00
Merged r16504 (#25478).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16522 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -860,7 +860,7 @@ class QueryTest < ActiveSupport::TestCase
|
||||
assert_include 2, ids
|
||||
end
|
||||
|
||||
def test_filter_on_relations_with_no_open_issues
|
||||
def test_filter_on_blocked_by_no_open_issues
|
||||
IssueRelation.delete_all
|
||||
# Issue 1 is blocked by 8, which is closed
|
||||
IssueRelation.create!(:relation_type => "blocked", :issue_from => Issue.find(1), :issue_to => Issue.find(8))
|
||||
@@ -874,6 +874,20 @@ class QueryTest < ActiveSupport::TestCase
|
||||
assert_include 1, ids
|
||||
end
|
||||
|
||||
def test_filter_on_related_with_no_open_issues
|
||||
IssueRelation.delete_all
|
||||
# Issue 1 is blocked by 8, which is closed
|
||||
IssueRelation.create!(relation_type: 'relates', issue_from: Issue.find(1), issue_to: Issue.find(8))
|
||||
# Issue 2 is blocked by 3, which is open
|
||||
IssueRelation.create!(relation_type: 'relates', issue_from: Issue.find(2), issue_to: Issue.find(3))
|
||||
|
||||
query = IssueQuery.new(:name => '_')
|
||||
query.filters = { 'relates' => { operator: '!o', values: [''] } }
|
||||
ids = find_issues_with_query(query).map(&:id)
|
||||
assert_equal [], ids & [2]
|
||||
assert_include 1, ids
|
||||
end
|
||||
|
||||
def test_filter_on_relations_with_no_issues
|
||||
IssueRelation.delete_all
|
||||
IssueRelation.create!(:relation_type => "relates", :issue_from => Issue.find(1), :issue_to => Issue.find(2))
|
||||
|
||||
Reference in New Issue
Block a user