diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-27 16:51:12 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-27 16:51:12 +0000 |
commit | 79e30e7087d714ad81de83d389c37ae7d46d4dad (patch) | |
tree | ce724e68907a3363c126bfc6d029c53539e9801f /test | |
parent | 0a224e8bb1a5939fb2745bfc936f9432960a9672 (diff) | |
download | redmine-79e30e7087d714ad81de83d389c37ae7d46d4dad.tar.gz redmine-79e30e7087d714ad81de83d389c37ae7d46d4dad.zip |
Refactor: convert News to a REST resource
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4214 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/news_controller_test.rb | 2 | ||||
-rw-r--r-- | test/integration/routing_test.rb | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 30ca5a26e..de5c055a4 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -113,7 +113,7 @@ class NewsControllerTest < ActionController::TestCase def test_destroy @request.session[:user_id] = 2 - post :destroy, :id => 1 + delete :destroy, :id => 1 assert_redirected_to 'projects/ecookbook/news' assert_nil News.find_by_id(1) end diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index be12dd027..37f262909 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -157,17 +157,14 @@ class RoutingTest < ActionController::IntegrationTest should_route :get, "/projects/567/news/new", :controller => 'news', :action => 'new', :project_id => '567' should_route :get, "/news/234", :controller => 'news', :action => 'show', :id => '234' should_route :get, "/news/567/edit", :controller => 'news', :action => 'edit', :id => '567' - should_route :get, "/news/123/preview", :controller => 'previews', :action => 'news', :id => '123' should_route :get, "/news/preview", :controller => 'previews', :action => 'news' should_route :post, "/projects/567/news", :controller => 'news', :action => 'create', :project_id => '567' - should_route :post, "/news/567/destroy", :controller => 'news', :action => 'destroy', :id => '567' should_route :post, "/news/567/comments", :controller => 'comments', :action => 'create', :id => '567' - should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' - - should_route :put, "/news/567/edit", :controller => 'news', :action => 'update', :id => '567' + should_route :put, "/news/567", :controller => 'news', :action => 'update', :id => '567' + should_route :delete, "/news/567", :controller => 'news', :action => 'destroy', :id => '567' should_route :delete, "/news/567/comments/15", :controller => 'comments', :action => 'destroy', :id => '567', :comment_id => '15' end |