summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-10-04 15:36:16 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-10-04 15:36:16 +0000
commita034172b24cde31bac0f18b842db8c76cfb80bb1 (patch)
tree82c93a52c8ecdbcdd2f610fe7a477dab0acaa1f6 /test
parent86ba692bf5312b37b6e30778d14daf0a675254bb (diff)
downloadredmine-a034172b24cde31bac0f18b842db8c76cfb80bb1.tar.gz
redmine-a034172b24cde31bac0f18b842db8c76cfb80bb1.zip
Refactor: convert UsersController to resource
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4231 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/admin_test.rb4
-rw-r--r--test/integration/routing_test.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/integration/admin_test.rb b/test/integration/admin_test.rb
index 0b736199b..1600f89bd 100644
--- a/test/integration/admin_test.rb
+++ b/test/integration/admin_test.rb
@@ -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
diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb
index 030f6b18a..b42468ffb 100644
--- a/test/integration/routing_test.rb
+++ b/test/integration/routing_test.rb
@@ -250,12 +250,12 @@ class RoutingTest < ActionController::IntegrationTest
should_route :get, "/users/444/edit", :controller => 'users', :action => 'edit', :id => '444'
should_route :get, "/users/222/edit/membership", :controller => 'users', :action => 'edit', :id => '222', :tab => 'membership'
- should_route :post, "/users/new", :controller => 'users', :action => 'create'
+ should_route :post, "/users", :controller => 'users', :action => 'create'
should_route :post, "/users/123/memberships", :controller => 'users', :action => 'edit_membership', :id => '123'
should_route :post, "/users/123/memberships/55", :controller => 'users', :action => 'edit_membership', :id => '123', :membership_id => '55'
should_route :post, "/users/567/memberships/12/destroy", :controller => 'users', :action => 'destroy_membership', :id => '567', :membership_id => '12'
- should_route :put, "/users/444/edit", :controller => 'users', :action => 'update', :id => '444'
+ should_route :put, "/users/444", :controller => 'users', :action => 'update', :id => '444'
end
# TODO: should they all be scoped under /projects/:project_id ?