Adds named scopes for users index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8081 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -49,6 +49,14 @@ class UsersControllerTest < ActionController::TestCase
|
||||
assert_nil assigns(:users).detect {|u| !u.active?}
|
||||
end
|
||||
|
||||
def test_index_with_status_filter
|
||||
get :index, :status => 3
|
||||
assert_response :success
|
||||
assert_template 'index'
|
||||
assert_not_nil assigns(:users)
|
||||
assert_equal [3], assigns(:users).map(&:status).uniq
|
||||
end
|
||||
|
||||
def test_index_with_name_filter
|
||||
get :index, :name => 'john'
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user