changes routes for issue reports to call issue scoped reports controller

pull/1186/head
Jens Ulferts 12 years ago
parent fe372af131
commit 602d722c25
  1. 4
      config/routes.rb
  2. 8
      test/integration/routing_test.rb

@ -147,8 +147,8 @@ OpenProject::Application.routes.draw do
collection do
get :all
match '/report/:detail' => 'reports#issue_report_details', :via => :get
match '/report' => 'reports#issue_report', :via => :get
match '/report/:detail' => 'issues/reports#report_details', :via => :get
match '/report' => 'issues/reports#report', :via => :get
# get a preview of a new issue (i.e. one without an ID)
match '/new/preview' => 'issues/previews#create', :as => 'preview_new', :via => :post

@ -382,12 +382,12 @@ class RoutingTest < ActionController::IntegrationTest
context "issue reports" do
context "issue_scoped" do
should route(:get, "/projects/567/issues/report").to( :controller => 'reports',
:action => 'issue_report',
should route(:get, "/projects/567/issues/report").to( :controller => 'issues/reports',
:action => 'report',
:project_id => '567' )
should route(:get, "/projects/567/issues/report/assigned_to").to( :controller => 'reports',
:action => 'issue_report_details',
should route(:get, "/projects/567/issues/report/assigned_to").to( :controller => 'issues/reports',
:action => 'report_details',
:project_id => '567',
:detail => 'assigned_to' )
end

Loading…
Cancel
Save