summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-28 18:41:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-28 18:41:08 +0000
commita7caf3faf023588f7363d4e09a3666d8d84d3604 (patch)
tree5cd0856292efbaf9a825b0e0203140a9e44f30d6
parentcc79feabe2d132517fc22fd86520d19274c831fe (diff)
downloadredmine-a7caf3faf023588f7363d4e09a3666d8d84d3604.tar.gz
redmine-a7caf3faf023588f7363d4e09a3666d8d84d3604.zip
Use assert_select instead of assert_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10108 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/repositories_subversion_controller_test.rb42
1 files 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