From bcae8790916aabc2a0462be506b7b7d76045456f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 18 Sep 2013 08:09:59 +0000 Subject: [PATCH] Merged r12139, r12140 and r12141 from trunk to 2.3-stable (#14931) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12144 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../repositories_bazaar_controller_test.rb | 29 +++++----------- .../repositories_mercurial_controller_test.rb | 33 +++++-------------- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb index 3da5400b4..892a08fb8 100644 --- a/test/functional/repositories_bazaar_controller_test.rb +++ b/test/functional/repositories_bazaar_controller_test.rb @@ -137,26 +137,15 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase :path => repository_path_hash(['doc-mkdir.txt'])[:param] assert_response :success assert_template 'annotate' - assert_tag :tag => 'th', :content => '2', - :sibling => { - :tag => 'td', - :child => { - :tag => 'a', - :content => '3' - } - } - assert_tag :tag => 'th', :content => '2', - :sibling => { :tag => 'td', :content => /jsmith/ } - assert_tag :tag => 'th', :content => '2', - :sibling => { - :tag => 'td', - :child => { - :tag => 'a', - :content => '3' - } - } - assert_tag :tag => 'th', :content => '2', - :sibling => { :tag => 'td', :content => /Main purpose/ } + assert_select "th.line-num", :text => '2' do + assert_select "+ td.revision" do + assert_select "a", :text => '3' + assert_select "+ td.author", :text => "jsmith@" do + assert_select "+ td", + :text => "Main purpose:" + end + end + end end def test_destroy_valid_repository diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 071fa7930..5ff4677ab 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -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 -- 2.39.5