Refactor: convert UsersController to resource

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4231 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-10-04 15:36:16 +00:00
parent 86ba692bf5
commit a034172b24
6 changed files with 16 additions and 16 deletions

View File

@@ -35,7 +35,7 @@ class AdminTest < ActionController::IntegrationTest
assert_kind_of User, logged_user
assert_equal "Paul", logged_user.firstname
put "users/#{user.id}/edit", :id => user.id, :user => { :status => User::STATUS_LOCKED }
put "users/#{user.id}", :id => user.id, :user => { :status => User::STATUS_LOCKED }
assert_redirected_to "/users/#{ user.id }/edit"
locked_user = User.try_to_login("psmith", "psmith09")
assert_equal nil, locked_user
@@ -44,6 +44,6 @@ class AdminTest < ActionController::IntegrationTest
test "Add a user as an anonymous user should fail" do
post '/users/create', :user => { :login => 'psmith', :firstname => 'Paul'}, :password => "psmith09", :password_confirmation => "psmith09"
assert_response :redirect
assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers%2Fnew"
assert_redirected_to "/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers"
end
end