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:
Jean-Philippe Lang
2011-12-04 22:24:33 +00:00
parent b9900661f4
commit f52410be19
4 changed files with 26 additions and 14 deletions
+8
View File
@@ -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