mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user