diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-13 13:52:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-13 13:52:56 +0000 |
commit | c31f498ba6a21fd3e5ce7b9ba2f3b3cdc1b2e05b (patch) | |
tree | 459eb338daf1a88b8819b47a9ecb2d024426a7d6 /test/functional/admin_controller_test.rb | |
parent | c93fccc84a939b14bd5d67d58514bd2ef58e4a08 (diff) | |
download | redmine-c31f498ba6a21fd3e5ce7b9ba2f3b3cdc1b2e05b.tar.gz redmine-c31f498ba6a21fd3e5ce7b9ba2f3b3cdc1b2e05b.zip |
Code cleanup: implement Plugin#to_param for generating routes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10995 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r-- | test/functional/admin_controller_test.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 28e8adb60..7a029722b 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -27,15 +27,13 @@ class AdminControllerTest < ActionController::TestCase def test_index get :index - assert_no_tag :tag => 'div', - :attributes => { :class => /nodata/ } + assert_select 'div.nodata', 0 end def test_index_with_no_configuration_data delete_configuration_data get :index - assert_tag :tag => 'div', - :attributes => { :class => /nodata/ } + assert_select 'div.nodata' end def test_projects @@ -128,8 +126,14 @@ class AdminControllerTest < ActionController::TestCase assert_response :success assert_template 'plugins' - assert_tag :td, :child => { :tag => 'span', :content => 'Foo plugin' } - assert_tag :td, :child => { :tag => 'span', :content => 'Bar' } + assert_select 'tr#plugin-foo' do + assert_select 'td span.name', :text => 'Foo plugin' + assert_select 'td.configure a[href=/settings/plugin/foo]' + end + assert_select 'tr#plugin-bar' do + assert_select 'td span.name', :text => 'Bar' + assert_select 'td.configure a', 0 + end end def test_info @@ -145,8 +149,7 @@ class AdminControllerTest < ActionController::TestCase get :index assert_response :success - assert_tag :a, :attributes => { :href => '/foo/bar' }, - :content => 'Test' + assert_select 'div#admin-menu a[href=/foo/bar]', :text => 'Test' Redmine::MenuManager.map :admin_menu do |menu| menu.delete :test_admin_menu_plugin_extension |