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:
parent
d967507dcb
commit
b4101c8b65
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue