Adds a test for parent issues display.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8062 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-03 18:25:53 +00:00
parent 443bc4bf90
commit 937a954013
1 changed files with 11 additions and 0 deletions

View File

@ -777,6 +777,17 @@ class IssuesControllerTest < ActionController::TestCase
:descendant => {:tag => 'td', :content => /Child Issue/, :attributes => {:class => /subject/}} :descendant => {:tag => 'td', :content => /Child Issue/, :attributes => {:class => /subject/}}
end end
def test_show_should_list_parents
issue = Issue.generate!(:project_id => 1, :author_id => 1, :tracker_id => 1, :parent_issue_id => 1, :subject => 'Child Issue')
get :show, :id => issue.id
assert_response :success
assert_tag 'div', :attributes => {:class => 'subject'},
:descendant => {:tag => 'h3', :content => 'Child Issue'}
assert_tag 'div', :attributes => {:class => 'subject'},
:descendant => {:tag => 'a', :attributes => {:href => '/issues/1'}}
end
def test_show_atom def test_show_atom
get :show, :id => 2, :format => 'atom' get :show, :id => 2, :format => 'atom'
assert_response :success assert_response :success