removes post issues#index route

* just use get
pull/1186/head
Jens Ulferts 12 years ago
parent f57b372807
commit 81e03169e3
  1. 1
      app/views/issues/index.html.erb
  2. 8
      config/routes.rb
  3. 9
      test/integration/issues_test.rb

@ -47,6 +47,7 @@
{ :url => { :set_filter => 1 },
:before => 'selectAllOptions("selected_columns");',
:update => "content",
:method => :get,
:complete => "apply_filters_observer()",
:with => "Form.serialize('query_form')"
}, :class => 'icon icon-checked' %>

@ -133,12 +133,8 @@ OpenProject::Application.routes.draw do
# get a preview of a new issue (i.e. one without an ID)
match '/new/preview' => 'previews#issue', :as => 'preview_new', :via => :post
# issues#index is right now used with get and post
# defining an extra route prevents confusion with create
match '/query' => 'issues#index', :via => :post
end
end
end
# TODO: nest under issues resources
@ -169,9 +165,6 @@ OpenProject::Application.routes.draw do
resources :issues do
collection do
# issues#index is right now used with get and post
# defining an extra route prevents confusion with create
match '/query' => 'issues#index', :via => :post
end
resources :time_entries, :controller => 'timelog'
@ -186,7 +179,6 @@ OpenProject::Application.routes.draw do
match '/projects/:id/members/new' => 'members#new'
resources :users, :member => {
:edit_membership => :post,
:destroy_membership => :post,

@ -106,13 +106,14 @@ class IssuesTest < ActionController::IntegrationTest
end
end
def test_other_formats_links_on_post_index_without_project_id_in_url
def test_other_formats_links_on_get_index_without_project_id_in_url
Role.anonymous.add_permission!(:export_issues)
post '/issues', :project_id => 'ecookbook'
get '/issues', :project_id => 'ecookbook'
%w(Atom PDF CSV).each do |format|
assert_tag :a, :content => format,
:attributes => { :href => "/projects/ecookbook/issues.#{format.downcase}",
:class => format.downcase,
:rel => 'nofollow' }
end
end
@ -126,9 +127,9 @@ class IssuesTest < ActionController::IntegrationTest
end
def test_pagination_links_on_post_index_without_project_id_in_url
def test_pagination_links_on_get_index_without_project_id_in_url
Setting.per_page_options = '2'
post '/issues', :project_id => 'ecookbook'
get '/issues', :project_id => 'ecookbook'
assert_tag :a, :content => '2',
:attributes => { :href => '/projects/ecookbook/issues?page=2' }

Loading…
Cancel
Save