]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for parent issues display.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Dec 2011 18:25:53 +0000 (18:25 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Dec 2011 18:25:53 +0000 (18:25 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8062 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index f054e13e4cc44b5ee235925d42018b7001547dde..f6821284d8e3b0bc6a4765899e0e069a40dec604 100644 (file)
@@ -777,6 +777,17 @@ class IssuesControllerTest < ActionController::TestCase
       :descendant => {:tag => 'td', :content => /Child Issue/, :attributes => {:class => /subject/}}
   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
     get :show, :id => 2, :format => 'atom'
     assert_response :success