summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-04 22:24:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-04 22:24:33 +0000
commitf52410be1922ba62c9a9b0313b5b86e13d8df704 (patch)
tree072c6a4ca3f0e0f206fe756fe47d65798dcd7f80 /test/functional/users_controller_test.rb
parentb9900661f4ade37dfc204a39f89c808c7755f771 (diff)
downloadredmine-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/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb8
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