diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-18 21:26:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-18 21:26:30 +0000 |
commit | ec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch) | |
tree | e4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/admin_controller_test.rb | |
parent | 1db54e228d98d20536133bf52a8af0ce67616dc3 (diff) | |
download | redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip |
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r-- | test/functional/admin_controller_test.rb | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 4752fb389..70a8ca683 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -39,29 +39,21 @@ class AdminControllerTest < Redmine::ControllerTest def test_projects get :projects assert_response :success - assert_template 'projects' - assert_not_nil assigns(:projects) - # active projects only - assert_nil assigns(:projects).detect {|u| !u.active?} + assert_select 'tr.project.closed', 0 end def test_projects_with_status_filter get :projects, :status => 1 assert_response :success - assert_template 'projects' - assert_not_nil assigns(:projects) - # active projects only - assert_nil assigns(:projects).detect {|u| !u.active?} + assert_select 'tr.project.closed', 0 end def test_projects_with_name_filter get :projects, :name => 'store', :status => '' assert_response :success - assert_template 'projects' - projects = assigns(:projects) - assert_not_nil projects - assert_equal 1, projects.size - assert_equal 'OnlineStore', projects.first.name + + assert_select 'tr.project td.name', :text => 'OnlineStore' + assert_select 'tr.project', 1 end def test_load_default_configuration_data @@ -107,8 +99,7 @@ class AdminControllerTest < Redmine::ControllerTest get :plugins assert_response :success - assert_template 'plugins' - assert_equal [], assigns(:plugins) + assert_select '.nodata' end def test_plugins @@ -125,7 +116,6 @@ class AdminControllerTest < Redmine::ControllerTest get :plugins assert_response :success - assert_template 'plugins' assert_select 'tr#plugin-foo' do assert_select 'td span.name', :text => 'Foo plugin' @@ -140,7 +130,6 @@ class AdminControllerTest < Redmine::ControllerTest def test_info get :info assert_response :success - assert_template 'info' end def test_admin_menu_plugin_extension |