From a7caf3faf023588f7363d4e09a3666d8d84d3604 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 Jul 2012 18:41:08 +0000 Subject: [PATCH] Use assert_select instead of assert_tag. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10108 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- ...repositories_subversion_controller_test.rb | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index a853a1028..42e4863c5 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -247,18 +247,15 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase get :revision, :id => 1, :rev => 2 assert_response :success assert_template 'revision' - assert_tag :tag => 'ul', - :child => { :tag => 'li', - # link to the entry at rev 2 - :child => { :tag => 'a', - :attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo'}, - :content => 'repo', - # link to partial diff - :sibling => { :tag => 'a', - :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo' } - } - } - } + + assert_select 'ul' do + assert_select 'li' do + # link to the entry at rev 2 + assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo', :text => 'repo' + # link to partial diff + assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo' + end + end end def test_invalid_revision @@ -298,18 +295,15 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase get :revision, :id => 1, :rev => 2 assert_response :success assert_template 'revision' - assert_tag :tag => 'ul', - :child => { :tag => 'li', - # link to the entry at rev 2 - :child => { :tag => 'a', - :attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo'}, - :content => 'repo', - # link to partial diff - :sibling => { :tag => 'a', - :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo' } - } - } - } + + assert_select 'ul' do + assert_select 'li' do + # link to the entry at rev 2 + assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo', :text => 'repo' + # link to partial diff + assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo' + end + end end def test_revision_diff -- 2.39.5