Refactor: Move the rest of the routing tests to RoutingTest.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3687 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-04-21 16:02:55 +00:00
parent 0fc884cf42
commit 9b595c689d
15 changed files with 167 additions and 702 deletions
-19
View File
@@ -31,14 +31,6 @@ class WikisControllerTest < ActionController::TestCase
User.current = nil
end
def test_edit_routing
assert_routing(
#TODO: use PUT
{:method => :post, :path => 'projects/ladida/wiki'},
:controller => 'wikis', :action => 'edit', :id => 'ladida'
)
end
def test_create
@request.session[:user_id] = 1
assert_nil Project.find(3).wiki
@@ -49,17 +41,6 @@ class WikisControllerTest < ActionController::TestCase
assert_equal 'Start page', wiki.start_page
end
def test_destroy_routing
assert_routing(
{:method => :get, :path => 'projects/ladida/wiki/destroy'},
:controller => 'wikis', :action => 'destroy', :id => 'ladida'
)
assert_recognizes( #TODO: use DELETE and update form
{:controller => 'wikis', :action => 'destroy', :id => 'ladida'},
{:method => :post, :path => 'projects/ladida/wiki/destroy'}
)
end
def test_destroy
@request.session[:user_id] = 1
post :destroy, :id => 1, :confirm => 1