From b4101c8b65ecab179a3af492023d95a20d4bc388 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 24 Oct 2008 17:01:42 +0000 Subject: [PATCH] Adds functional test for user search. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1946 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/users_controller_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 8629a7131..c774c164c 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -47,6 +47,16 @@ class UsersControllerTest < Test::Unit::TestCase assert_nil assigns(:users).detect {|u| !u.active?} end + def test_list_with_name_filter + get :list, :name => 'john' + assert_response :success + assert_template 'list' + users = assigns(:users) + assert_not_nil users + assert_equal 1, users.size + assert_equal 'John', users.first.firstname + end + def test_edit_membership post :edit_membership, :id => 2, :membership_id => 1, :membership => { :role_id => 2}