From 36c82ecc1f0da922014c480930500896750b1e03 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 3 May 2010 16:02:37 +0000 Subject: Refactor: move Project Calendar to it's own controller. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3732 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/calendars_controller_test.rb | 20 ++++++++++++++++++++ test/functional/issues_controller_test.rb | 14 -------------- test/integration/routing_test.rb | 8 ++++---- 3 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 test/functional/calendars_controller_test.rb (limited to 'test') diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb new file mode 100644 index 000000000..fa07fdd47 --- /dev/null +++ b/test/functional/calendars_controller_test.rb @@ -0,0 +1,20 @@ +require 'test_helper' + +class CalendarsControllerTest < ActionController::TestCase + fixtures :all + + def test_calendar + get :show, :project_id => 1 + assert_response :success + assert_template 'calendar' + assert_not_nil assigns(:calendar) + end + + def test_cross_project_calendar + get :show + assert_response :success + assert_template 'calendar' + assert_not_nil assigns(:calendar) + end + +end diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 1097419ff..670fb2d7e 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -231,20 +231,6 @@ class IssuesControllerTest < ActionController::TestCase assert_equal columns, session[:query][:column_names].map(&:to_s) end - def test_calendar - get :calendar, :project_id => 1 - assert_response :success - assert_template 'calendar' - assert_not_nil assigns(:calendar) - end - - def test_cross_project_calendar - get :calendar - assert_response :success - assert_template 'calendar' - assert_not_nil assigns(:calendar) - end - def test_changes get :changes, :project_id => 1 assert_response :success diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index c4736d415..f8476df56 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -90,10 +90,10 @@ class RoutingTest < ActionController::IntegrationTest should_route :post, "/issues/1/quoted", :controller => 'issues', :action => 'reply', :id => '1' - should_route :get, "/issues/calendar", :controller => 'issues', :action => 'calendar' - should_route :post, "/issues/calendar", :controller => 'issues', :action => 'calendar' - should_route :get, "/projects/project-name/issues/calendar", :controller => 'issues', :action => 'calendar', :project_id => 'project-name' - should_route :post, "/projects/project-name/issues/calendar", :controller => 'issues', :action => 'calendar', :project_id => 'project-name' + should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show' + should_route :post, "/issues/calendar", :controller => 'calendars', :action => 'show' + 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 :get, "/issues/gantt", :controller => 'gantts', :action => 'show' should_route :post, "/issues/gantt", :controller => 'gantts', :action => 'show' -- cgit v1.2.3