diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-22 09:38:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-22 09:38:21 +0000 |
commit | f3e573b5f891c71f9395562a3f8747ecec801091 (patch) | |
tree | 7987fd3efa8ae985b532a03e7e0f529fa997258d /test/functional/repositories_cvs_controller_test.rb | |
parent | 3602cd637c9ece4e0caa42c335acb7dce719a20e (diff) | |
download | redmine-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/repositories_cvs_controller_test.rb')
-rw-r--r-- | test/functional/repositories_cvs_controller_test.rb | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 5e245bc1b..65be94db0 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -112,9 +112,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] assert_response :success assert_template 'entry' - assert_no_tag :tag => 'td', - :attributes => { :class => /line-code/}, - :content => /before_filter/ + assert_select 'td.line-code', :text => /before_filter/, :count => 0 end def test_entry_at_given_revision @@ -129,9 +127,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_response :success assert_template 'entry' # this line was removed in r3 - assert_tag :tag => 'td', - :attributes => { :class => /line-code/}, - :content => /before_filter/ + assert_select 'td.line-code', :text => /before_filter/ end def test_entry_not_found @@ -141,9 +137,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_equal NUM_REV, @repository.changesets.count get :entry, :id => PRJ_ID, :path => repository_path_hash(['sources', 'zzz.c'])[:param] - assert_tag :tag => 'p', - :attributes => { :id => /errorExplanation/ }, - :content => /The entry or revision was not found in the repository/ + assert_select 'p#errorExplanation', :text => /The entry or revision was not found in the repository/ end def test_entry_download @@ -179,10 +173,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase get :diff, :id => PRJ_ID, :rev => 3, :type => dt assert_response :success assert_template 'diff' - assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_out' }, - :content => /before_filter :require_login/ - assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' }, - :content => /with one change/ + assert_select 'td.line-code.diff_out', :text => /before_filter :require_login/ + assert_select 'td.line-code.diff_in', :text => /with one change/ end end @@ -195,16 +187,11 @@ class RepositoriesCvsControllerTest < ActionController::TestCase get :diff, :id => PRJ_ID, :rev => 1, :type => dt assert_response :success assert_template 'diff' - assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' }, - :content => /watched.remove_watcher/ - assert_tag :tag => 'th', :attributes => { :class => 'filename' }, - :content => /test\/README/ - assert_tag :tag => 'th', :attributes => { :class => 'filename' }, - :content => /test\/images\/delete.png/ - assert_tag :tag => 'th', :attributes => { :class => 'filename' }, - :content => /test\/images\/edit.png/ - assert_tag :tag => 'th', :attributes => { :class => 'filename' }, - :content => /test\/sources\/watchers_controller.rb/ + assert_select 'td.line-code.diff_in', :text => /watched.remove_watcher/ + assert_select 'th.filename', :text => /test\/README/ + assert_select 'th.filename', :text => /test\/images\/delete.png/ + assert_select 'th.filename', :text => /test\/images\/edit.png/ + assert_select 'th.filename', :text => /test\/sources\/watchers_controller.rb/ end end |