diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-04 22:24:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-04 22:24:33 +0000 |
commit | f52410be1922ba62c9a9b0313b5b86e13d8df704 (patch) | |
tree | 072c6a4ca3f0e0f206fe756fe47d65798dcd7f80 /test/functional | |
parent | b9900661f4ade37dfc204a39f89c808c7755f771 (diff) | |
download | redmine-f52410be1922ba62c9a9b0313b5b86e13d8df704.tar.gz redmine-f52410be1922ba62c9a9b0313b5b86e13d8df704.zip |
Adds named scopes for users index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8081 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/users_controller_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 163d8f642..a39358152 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -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 |