diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-12 08:36:46 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-12 08:36:46 +0000 |
commit | 7707457145442d6177ce57c956dbe09af65df1b4 (patch) | |
tree | 2278f27bf20e08bb2f92e42ab728b4427cce6f07 /test/integration/admin_test.rb | |
parent | 847c7367b429e8df0e0fa1dbf3e415e37dd82bf1 (diff) | |
download | redmine-7707457145442d6177ce57c956dbe09af65df1b4.tar.gz redmine-7707457145442d6177ce57c956dbe09af65df1b4.zip |
User groups branch merged.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2869 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/admin_test.rb')
-rw-r--r-- | test/integration/admin_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/integration/admin_test.rb b/test/integration/admin_test.rb index dd14e6661..66c6b21cd 100644 --- a/test/integration/admin_test.rb +++ b/test/integration/admin_test.rb @@ -18,7 +18,7 @@ require "#{File.dirname(__FILE__)}/../test_helper" class AdminTest < ActionController::IntegrationTest - fixtures :users + fixtures :all def test_add_user log_user("admin", "admin") @@ -26,16 +26,17 @@ class AdminTest < ActionController::IntegrationTest assert_response :success assert_template "users/add" post "/users/add", :user => { :login => "psmith", :firstname => "Paul", :lastname => "Smith", :mail => "psmith@somenet.foo", :language => "en" }, :password => "psmith09", :password_confirmation => "psmith09" - assert_redirected_to "/users" user = User.find_by_login("psmith") assert_kind_of User, user + assert_redirected_to "/users/#{ user.id }/edit" + logged_user = User.try_to_login("psmith", "psmith09") assert_kind_of User, logged_user assert_equal "Paul", logged_user.firstname post "users/edit", :id => user.id, :user => { :status => User::STATUS_LOCKED } - assert_redirected_to "/users" + assert_redirected_to "/users/#{ user.id }/edit" locked_user = User.try_to_login("psmith", "psmith09") assert_equal nil, locked_user end |