Adds functional test for user search.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1946 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-10-24 17:01:42 +00:00
parent d967507dcb
commit b4101c8b65
1 changed files with 10 additions and 0 deletions

View File

@ -47,6 +47,16 @@ class UsersControllerTest < Test::Unit::TestCase
assert_nil assigns(:users).detect {|u| !u.active?} assert_nil assigns(:users).detect {|u| !u.active?}
end 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 def test_edit_membership
post :edit_membership, :id => 2, :membership_id => 1, post :edit_membership, :id => 2, :membership_id => 1,
:membership => { :role_id => 2} :membership => { :role_id => 2}