From 56e984b5e740398d0659432ecdee770de1943e84 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 26 Aug 2010 16:36:59 +0000 Subject: Refactor: convert many of the custom Issue routes to REST resources. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4041 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/context_menus_controller_test.rb | 2 +- test/integration/issues_test.rb | 2 +- test/integration/routing_test.rb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/functional/context_menus_controller_test.rb b/test/functional/context_menus_controller_test.rb index eee9dc608..764350879 100644 --- a/test/functional/context_menus_controller_test.rb +++ b/test/functional/context_menus_controller_test.rb @@ -12,7 +12,7 @@ class ContextMenusControllerTest < ActionController::TestCase :attributes => { :href => '/issues/1/edit', :class => 'icon-edit' } assert_tag :tag => 'a', :content => 'Closed', - :attributes => { :href => '/issues/1/edit?issue%5Bstatus_id%5D=5', + :attributes => { :href => '/issues/1?issue%5Bstatus_id%5D=5', :class => '' } assert_tag :tag => 'a', :content => 'Immediate', :attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bpriority_id%5D=8', diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index 0c1a36d34..c8a151cfd 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -69,7 +69,7 @@ class IssuesTest < ActionController::IntegrationTest log_user('jsmith', 'jsmith') set_tmp_attachments_directory - put 'issues/1/edit', + put 'issues/1', :notes => 'Some notes', :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'This is an attachment'}} assert_redirected_to "issues/1" diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 119b506ae..9b5f39399 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -91,14 +91,14 @@ class RoutingTest < ActionController::IntegrationTest should_route :post, "/issues/1/quoted", :controller => 'journals', :action => 'new', :id => '1' should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show' - should_route :post, "/issues/calendar", :controller => 'calendars', :action => 'show' + should_route :put, "/issues/calendar", :controller => 'calendars', :action => 'update' should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name' - should_route :post, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name' + should_route :put, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'update', :project_id => 'project-name' should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show' - should_route :post, "/issues/gantt", :controller => 'gantts', :action => 'show' + should_route :put, "/issues/gantt", :controller => 'gantts', :action => 'update' should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name' - should_route :post, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name' + should_route :put, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'update', :project_id => 'project-name' should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues' -- cgit v1.2.3