diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-20 19:57:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-20 19:57:06 +0000 |
commit | 36d487fe505fbad9b0bc18a4d8f7b435a211be4a (patch) | |
tree | 7bf75212c0d2a0ea45db6ea1ebc7fa8460a34648 /test/functional/documents_controller_test.rb | |
parent | 2a43f1adbcbe155eb7c3c4a60c5c0c289dec2a0f (diff) | |
download | redmine-36d487fe505fbad9b0bc18a4d8f7b435a211be4a.tar.gz redmine-36d487fe505fbad9b0bc18a4d8f7b435a211be4a.zip |
Replaced some #assert_tag with #assert_select.
git-svn-id: http://svn.redmine.org/redmine/trunk@13620 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/documents_controller_test.rb')
-rw-r--r-- | test/functional/documents_controller_test.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index 4b3085565..2b1a96127 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -37,31 +37,30 @@ class DocumentsControllerTest < ActionController::TestCase assert_not_nil assigns(:grouped) # Default category selected in the new document form - assert_tag :select, :attributes => {:name => 'document[category_id]'}, - :child => {:tag => 'option', :attributes => {:selected => 'selected'}, - :content => 'Technical documentation'} + assert_select 'select[name=?]', 'document[category_id]' do + assert_select 'option[selected=selected]', :text => 'Technical documentation' - assert ! DocumentCategory.find(16).active? - assert_no_tag :option, :attributes => {:value => '16'}, - :parent => {:tag => 'select', :attributes => {:id => 'document_category_id'} } + assert ! DocumentCategory.find(16).active? + assert_select 'option[value="16"]', 0 + end end def test_index_grouped_by_date get :index, :project_id => 'ecookbook', :sort_by => 'date' assert_response :success - assert_tag 'h3', :content => '2007-02-12' + assert_select 'h3', :text => '2007-02-12' end def test_index_grouped_by_title get :index, :project_id => 'ecookbook', :sort_by => 'title' assert_response :success - assert_tag 'h3', :content => 'T' + assert_select 'h3', :text => 'T' end def test_index_grouped_by_author get :index, :project_id => 'ecookbook', :sort_by => 'author' assert_response :success - assert_tag 'h3', :content => 'John Smith' + assert_select 'h3', :text => 'John Smith' end def test_index_with_long_description |