Mercurial > hg > soundsoftware-site
diff test/functional/users_controller_test.rb @ 442:753f1380d6bc cannam
Merge from branch "redmine-1.2"
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:41:04 +0100 |
parents | cbce1fd3b1b7 |
children | cbb26bc654de |
line wrap: on
line diff
--- a/test/functional/users_controller_test.rb Thu Mar 03 15:08:45 2011 +0000 +++ b/test/functional/users_controller_test.rb Mon Jun 06 14:41:04 2011 +0100 @@ -1,5 +1,5 @@ -# redMine - project management software -# Copyright (C) 2006-2007 Jean-Philippe Lang +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -24,7 +24,7 @@ class UsersControllerTest < ActionController::TestCase include Redmine::I18n - fixtures :users, :projects, :members, :member_roles, :roles, :auth_sources, :custom_fields, :custom_values + fixtures :users, :projects, :members, :member_roles, :roles, :auth_sources, :custom_fields, :custom_values, :groups_users def setup @controller = UsersController.new @@ -59,6 +59,15 @@ assert_equal 'John', users.first.firstname end + def test_index_with_group_filter + get :index, :group_id => '10' + assert_response :success + assert_template 'index' + users = assigns(:users) + assert users.any? + assert_equal([], (users - Group.find(10).users)) + end + def test_show @request.session[:user_id] = nil get :show, :id => 2