Mercurial > hg > soundsoftware-site
comparison test/integration/admin_test.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 94944d00e43c |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
13 # | 13 # |
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.dirname(__FILE__)}/../test_helper" | 18 require File.expand_path('../../test_helper', __FILE__) |
19 | 19 |
20 class AdminTest < ActionController::IntegrationTest | 20 class AdminTest < ActionController::IntegrationTest |
21 fixtures :all | 21 fixtures :all |
22 | 22 |
23 def test_add_user | 23 def test_add_user |
24 log_user("admin", "admin") | 24 log_user("admin", "admin") |
25 get "/users/new" | 25 get "/users/new" |
26 assert_response :success | 26 assert_response :success |
27 assert_template "users/new" | 27 assert_template "users/new" |
28 post "/users/create", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09" | 28 post "/users/create", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en", :password => "psmith09", :password_confirmation => "psmith09" } |
29 | 29 |
30 user = User.find_by_login("psmith") | 30 user = User.find_by_login("psmith") |
31 assert_kind_of User, user | 31 assert_kind_of User, user |
32 assert_redirected_to "/users/#{ user.id }/edit" | 32 assert_redirected_to "/users/#{ user.id }/edit" |
33 | 33 |