Mercurial > hg > soundsoftware-site
comparison test/functional/users_controller_test.rb @ 1295:622f24f53b42 redmine-2.3
Update to Redmine SVN revision 11972 on 2.3-stable branch
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:02:21 +0100 |
parents | 433d4f72a19b |
children |
comparison
equal
deleted
inserted
replaced
1294:3e4c3460b6ca | 1295:622f24f53b42 |
---|---|
1 # Redmine - project management software | 1 # Redmine - project management software |
2 # Copyright (C) 2006-2012 Jean-Philippe Lang | 2 # Copyright (C) 2006-2013 Jean-Philippe Lang |
3 # | 3 # |
4 # This program is free software; you can redistribute it and/or | 4 # This program is free software; you can redistribute it and/or |
5 # modify it under the terms of the GNU General Public License | 5 # modify it under the terms of the GNU General Public License |
6 # as published by the Free Software Foundation; either version 2 | 6 # as published by the Free Software Foundation; either version 2 |
7 # of the License, or (at your option) any later version. | 7 # of the License, or (at your option) any later version. |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 require File.expand_path('../../test_helper', __FILE__) | 18 require File.expand_path('../../test_helper', __FILE__) |
19 require 'users_controller' | |
20 | |
21 # Re-raise errors caught by the controller. | |
22 class UsersController; def rescue_action(e) raise e end; end | |
23 | 19 |
24 class UsersControllerTest < ActionController::TestCase | 20 class UsersControllerTest < ActionController::TestCase |
25 include Redmine::I18n | 21 include Redmine::I18n |
26 | 22 |
27 fixtures :users, :projects, :members, :member_roles, :roles, | 23 fixtures :users, :projects, :members, :member_roles, :roles, |
28 :custom_fields, :custom_values, :groups_users, | 24 :custom_fields, :custom_values, :groups_users, |
29 :auth_sources | 25 :auth_sources |
30 | 26 |
31 def setup | 27 def setup |
32 @controller = UsersController.new | |
33 @request = ActionController::TestRequest.new | |
34 @response = ActionController::TestResponse.new | |
35 User.current = nil | 28 User.current = nil |
36 @request.session[:user_id] = 1 # admin | 29 @request.session[:user_id] = 1 # admin |
37 end | 30 end |
38 | 31 |
39 def test_index | 32 def test_index |