diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-03 16:02:37 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-03 16:02:37 +0000 |
commit | 36c82ecc1f0da922014c480930500896750b1e03 (patch) | |
tree | aae1ce92979307cf1f98c340eee3b9794f0b3852 /test | |
parent | 469ff0fb4e44f61c1bfdcbffb785f54d1f82035d (diff) | |
download | redmine-36c82ecc1f0da922014c480930500896750b1e03.tar.gz redmine-36c82ecc1f0da922014c480930500896750b1e03.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/calendars_controller_test.rb | 20 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 14 | ||||
-rw-r--r-- | test/integration/routing_test.rb | 8 |
3 files changed, 24 insertions, 18 deletions
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' |