##// END OF EJS Templates
Removed obsolete routes....
Jean-Philippe Lang -
r7897:526736dedced
parent child
Show More
@@ -92,10 +92,6 ActionController::Routing::Routes.draw do |map|
92 reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
92 reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
93 end
93 end
94
94
95 # Following two routes conflict with the resources because #index allows POST
96 map.connect '/issues', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
97 map.connect '/issues/create', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
98
99 map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues|
95 map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues|
100 issues.resources :time_entries, :controller => 'timelog'
96 issues.resources :time_entries, :controller => 'timelog'
101 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
97 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
@@ -89,7 +89,7 class IssuesTest < ActionController::IntegrationTest
89 assert_equal 0, Issue.find(1).attachments.length
89 assert_equal 0, Issue.find(1).attachments.length
90 end
90 end
91
91
92 def test_other_formats_links_on_get_index
92 def test_other_formats_links_on_index
93 get '/projects/ecookbook/issues'
93 get '/projects/ecookbook/issues'
94
94
95 %w(Atom PDF CSV).each do |format|
95 %w(Atom PDF CSV).each do |format|
@@ -99,8 +99,8 class IssuesTest < ActionController::IntegrationTest
99 end
99 end
100 end
100 end
101
101
102 def test_other_formats_links_on_post_index_without_project_id_in_url
102 def test_other_formats_links_on_index_without_project_id_in_url
103 post '/issues', :project_id => 'ecookbook'
103 get '/issues', :project_id => 'ecookbook'
104
104
105 %w(Atom PDF CSV).each do |format|
105 %w(Atom PDF CSV).each do |format|
106 assert_tag :a, :content => format,
106 assert_tag :a, :content => format,
@@ -109,7 +109,7 class IssuesTest < ActionController::IntegrationTest
109 end
109 end
110 end
110 end
111
111
112 def test_pagination_links_on_get_index
112 def test_pagination_links_on_index
113 Setting.per_page_options = '2'
113 Setting.per_page_options = '2'
114 get '/projects/ecookbook/issues'
114 get '/projects/ecookbook/issues'
115
115
@@ -118,9 +118,9 class IssuesTest < ActionController::IntegrationTest
118
118
119 end
119 end
120
120
121 def test_pagination_links_on_post_index_without_project_id_in_url
121 def test_pagination_links_on_index_without_project_id_in_url
122 Setting.per_page_options = '2'
122 Setting.per_page_options = '2'
123 post '/issues', :project_id => 'ecookbook'
123 get '/issues', :project_id => 'ecookbook'
124
124
125 assert_tag :a, :content => '2',
125 assert_tag :a, :content => '2',
126 :attributes => { :href => '/projects/ecookbook/issues?page=2' }
126 :attributes => { :href => '/projects/ecookbook/issues?page=2' }
General Comments 0
You need to be logged in to leave comments. Login now