Fix 500 errors with a POST request that requires a login. #4216

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3050 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-11-14 19:41:02 +00:00
parent b2e4d8ad3f
commit 93bf1df5d4
2 changed files with 13 additions and 1 deletions
+6
View File
@@ -40,4 +40,10 @@ class AdminTest < ActionController::IntegrationTest
locked_user = User.try_to_login("psmith", "psmith09")
assert_equal nil, locked_user
end
test "Add a user as an anonymous user should fail" do
post '/users/add', :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"
end
end