diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-04-21 16:02:55 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-04-21 16:02:55 +0000 |
commit | 9b595c689d06ffc1386e242177358711bdbf5c3a (patch) | |
tree | 50b51d5cf708fe43aa2b3dce4d56ea871b3e1319 /test/functional/news_controller_test.rb | |
parent | 0fc884cf422356a2b57131daaa3340fd9da91b46 (diff) | |
download | redmine-9b595c689d06ffc1386e242177358711bdbf5c3a.tar.gz redmine-9b595c689d06ffc1386e242177358711bdbf5c3a.zip |
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
Diffstat (limited to 'test/functional/news_controller_test.rb')
-rw-r--r-- | test/functional/news_controller_test.rb | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 427d75b75..3abb9a7fb 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -31,20 +31,6 @@ class NewsControllerTest < ActionController::TestCase User.current = nil end - def test_index_routing - assert_routing( - {:method => :get, :path => '/news'}, - :controller => 'news', :action => 'index' - ) - end - - def test_index_routing_formatted - assert_routing( - {:method => :get, :path => '/news.atom'}, - :controller => 'news', :action => 'index', :format => 'atom' - ) - end - def test_index get :index assert_response :success @@ -53,20 +39,6 @@ class NewsControllerTest < ActionController::TestCase assert_nil assigns(:project) end - def test_index_with_project_routing - assert_routing( - {:method => :get, :path => '/projects/567/news'}, - :controller => 'news', :action => 'index', :project_id => '567' - ) - end - - def test_index_with_project_routing_formatted - assert_routing( - {:method => :get, :path => '/projects/567/news.atom'}, - :controller => 'news', :action => 'index', :project_id => '567', :format => 'atom' - ) - end - def test_index_with_project get :index, :project_id => 1 assert_response :success @@ -74,13 +46,6 @@ class NewsControllerTest < ActionController::TestCase assert_not_nil assigns(:newss) end - def test_show_routing - assert_routing( - {:method => :get, :path => '/news/2'}, - :controller => 'news', :action => 'show', :id => '2' - ) - end - def test_show get :show, :id => 1 assert_response :success @@ -93,17 +58,6 @@ class NewsControllerTest < ActionController::TestCase assert_response 404 end - def test_new_routing - assert_routing( - {:method => :get, :path => '/projects/567/news/new'}, - :controller => 'news', :action => 'new', :project_id => '567' - ) - assert_recognizes( - {:controller => 'news', :action => 'new', :project_id => '567'}, - {:method => :post, :path => '/projects/567/news'} - ) - end - def test_get_new @request.session[:user_id] = 2 get :new, :project_id => 1 @@ -129,17 +83,6 @@ class NewsControllerTest < ActionController::TestCase assert_equal 1, ActionMailer::Base.deliveries.size end - def test_edit_routing - assert_routing( - {:method => :get, :path => '/news/234'}, - :controller => 'news', :action => 'show', :id => '234' - ) - assert_recognizes(#TODO: PUT to news URI instead, need to modify form - {:controller => 'news', :action => 'edit', :id => '567'}, - {:method => :post, :path => '/news/567/edit'} - ) - end - def test_get_edit @request.session[:user_id] = 2 get :edit, :id => 1 @@ -197,13 +140,6 @@ class NewsControllerTest < ActionController::TestCase assert_equal comments_count - 1, News.find(1).comments.size end - def test_destroy_routing - assert_recognizes(#TODO: should use DELETE to news URI, need to change form - {:controller => 'news', :action => 'destroy', :id => '567'}, - {:method => :post, :path => '/news/567/destroy'} - ) - end - def test_destroy @request.session[:user_id] = 2 post :destroy, :id => 1 |