Feature #37532 » test_render_issue_relations.patch
test/helpers/issues_helper_test.rb | ||
---|---|---|
406 | 406 |
assert_include '<a href="/issues?issue_id=15%2C16&set_filter=true&status_id=c">1 closed</a>', html |
407 | 407 |
end |
408 | 408 | |
409 |
def test_render_issue_relations |
|
410 |
issue = Issue.generate!(:status_id => 1) |
|
411 |
closed_issue = Issue.generate!(:status_id => 5) |
|
412 |
relation = IssueRelation.create!(:issue_from => closed_issue, |
|
413 |
:issue_to => issue, |
|
414 |
:relation_type => IssueRelation::TYPE_FOLLOWS) |
|
415 | ||
416 |
html = render_issue_relations(issue, [relation]) |
|
417 |
assert_include "<tr id=\"relation-#{relation.id}\" class=\"issue hascontextmenu issue tracker-#{closed_issue.tracker_id} status-#{closed_issue.status_id} priority-#{closed_issue.priority_id} priority-default closed rel-follows\">", html |
|
418 | ||
419 |
html = render_issue_relations(closed_issue, [relation]) |
|
420 |
assert_include "<tr id=\"relation-#{relation.id}\" class=\"issue hascontextmenu issue tracker-#{issue.tracker_id} status-#{issue.status_id} priority-#{issue.priority_id} priority-default rel-precedes\">", html |
|
421 |
end |
|
422 | ||
409 | 423 |
def test_render_descendants_stats |
410 | 424 |
parent = Issue.generate!(:status_id => 1) |
411 | 425 |
child = Issue.generate!(:parent_issue_id => parent.id, :status_id => 1) |