]> source.dussan.org Git - redmine.git/commitdiff
use assert_select instead of assert_tag in Mercurial annotate test (#14931)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 Sep 2013 05:01:35 +0000 (05:01 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 Sep 2013 05:01:35 +0000 (05:01 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12140 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_mercurial_controller_test.rb

index c541d7da8597bb272f0870256ecbb937c11f0114..5d3feb8e252e6123ac884b02ebe2b52aba9085b7 100644 (file)
@@ -432,30 +432,15 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
             :rev => r1
         assert_response :success
         assert_template 'annotate'
-        assert_tag :tag => 'th',
-                 :content => '1',
-                 :attributes => { :class => 'line-num' },
-                 :sibling =>
-                       {
-                         :tag => 'td',
-                         :attributes => { :class => 'revision' },
-                         :child => { :tag => 'a', :content => '20:709858aafd1b' }
-                       }
-        assert_tag :tag => 'th',
-                 :content => '1',
-                 :attributes => { :class => 'line-num' },
-                 :sibling =>
-                       {
-                          :tag     => 'td'    ,
-                          :content => /jsmith/ ,
-                          :attributes => { :class   => 'author' },
-                        }
-        assert_tag :tag => 'th',
-                 :content => '1',
-                 :attributes => { :class => 'line-num' },
-                 :sibling => { :tag => 'td',
-                               :content => /Mercurial is a distributed version control system/ }
-
+        assert_select "th.line-num", :text => '1' do
+          assert_select "+ td.revision" do
+            assert_select "a", :text => '20:709858aafd1b'
+            assert_select "+ td.author", :text => "jsmith" do
+              assert_select "+ td",
+                            :text => "Mercurial is a distributed version control system."
+            end
+          end
+        end
       end
     end