summaryrefslogtreecommitdiffstats
path: root/test/functional/sys_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-22 09:38:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-22 09:38:21 +0000
commitf3e573b5f891c71f9395562a3f8747ecec801091 (patch)
tree7987fd3efa8ae985b532a03e7e0f529fa997258d /test/functional/sys_controller_test.rb
parent3602cd637c9ece4e0caa42c335acb7dce719a20e (diff)
downloadredmine-f3e573b5f891c71f9395562a3f8747ecec801091.tar.gz
redmine-f3e573b5f891c71f9395562a3f8747ecec801091.zip
Replaced remaining #assert_tag with #assert_select.
git-svn-id: http://svn.redmine.org/redmine/trunk@13624 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/sys_controller_test.rb')
-rw-r--r--test/functional/sys_controller_test.rb27
1 files changed, 15 insertions, 12 deletions
diff --git a/test/functional/sys_controller_test.rb b/test/functional/sys_controller_test.rb
index de9c7c5e1..3710e7c3b 100644
--- a/test/functional/sys_controller_test.rb
+++ b/test/functional/sys_controller_test.rb
@@ -33,12 +33,16 @@ class SysControllerTest < ActionController::TestCase
get :projects
assert_response :success
assert_equal 'application/xml', @response.content_type
- with_options :tag => 'projects' do |test|
- test.assert_tag :children => { :count => Project.active.has_module(:repository).count }
- test.assert_tag 'project', :child => {:tag => 'identifier', :sibling => {:tag => 'is-public'}}
+
+ assert_select 'projects' do
+ assert_select 'project', Project.active.has_module(:repository).count
+ assert_select 'project' do
+ assert_select 'identifier'
+ assert_select 'is-public'
+ end
end
- assert_no_tag 'extra-info'
- assert_no_tag 'extra_info'
+ assert_select 'extra-info', 0
+ assert_select 'extra_info', 0
end
def test_create_project_repository
@@ -54,13 +58,12 @@ class SysControllerTest < ActionController::TestCase
assert r.is_a?(Repository::Subversion)
assert_equal 'file:///create/project/repository/subproject2', r.url
- assert_tag 'repository-subversion',
- :child => {
- :tag => 'id', :content => r.id.to_s,
- :sibling => {:tag => 'url', :content => r.url}
- }
- assert_no_tag 'extra-info'
- assert_no_tag 'extra_info'
+ assert_select 'repository-subversion' do
+ assert_select 'id', :text => r.id.to_s
+ assert_select 'url', :text => r.url
+ end
+ assert_select 'extra-info', 0
+ assert_select 'extra_info', 0
end
def test_create_already_existing