From 16eda4c5c91c55a09eec7a1d04b9db98aeb4ece5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 24 Oct 2008 17:12:39 +0000 Subject: Adds the ability to search for a project name or identifier on the administration projects list. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1947 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/admin_controller_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 05205b399..7c2626082 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -45,6 +45,25 @@ class AdminControllerTest < Test::Unit::TestCase :attributes => { :class => /nodata/ } end + 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?} + 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 + end + def test_load_default_configuration_data delete_configuration_data post :default_configuration, :lang => 'fr' -- cgit v1.2.3