From 05e897896a7e2b55ef4d78465d1d0e912e179b74 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 5 Jan 2012 08:03:06 +0000 Subject: [PATCH] test: route: add tests of timelogs report global scope format route and issues scope routes git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8515 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/timelog_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/integration/routing/timelog_test.rb b/test/integration/routing/timelog_test.rb index d4e2bc703..948b415b2 100644 --- a/test/integration/routing/timelog_test.rb +++ b/test/integration/routing/timelog_test.rb @@ -183,11 +183,30 @@ class RoutingTimelogsTest < ActionController::IntegrationTest { :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234', :project_id => 'ecookbook' } ) + end + + def test_timelogs_report assert_routing( { :method => 'get', :path => "/time_entries/report" }, { :controller => 'timelog', :action => 'report' } ) + assert_routing( + { :method => 'get', + :path => "/time_entries/report.csv" }, + { :controller => 'timelog', :action => 'report', :format => 'csv' } + ) + assert_routing( + { :method => 'get', + :path => "/issues/234/time_entries/report" }, + { :controller => 'timelog', :action => 'report', :issue_id => '234' } + ) + assert_routing( + { :method => 'get', + :path => "/issues/234/time_entries/report.csv" }, + { :controller => 'timelog', :action => 'report', :issue_id => '234', + :format => 'csv' } + ) assert_routing( { :method => 'get', :path => "/projects/567/time_entries/report" },