diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-25 16:16:46 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-25 16:16:46 +0000 |
commit | 4b045badcfde2eb27b63023ca8f3c30334d7f00f (patch) | |
tree | f79e433aea72c3b42f50065a26ffd6da535d229f /test | |
parent | 0e951c071631fee35962b264d3db2c68961bf670 (diff) | |
download | redmine-4b045badcfde2eb27b63023ca8f3c30334d7f00f.tar.gz redmine-4b045badcfde2eb27b63023ca8f3c30334d7f00f.zip |
Refactor: Rename WikiController#page_index to #index
index is the action that should list a collection of records, which is
what #page_index does.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4290 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 14 | ||||
-rw-r--r-- | test/integration/routing_test.rb | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 61e265925..fecde6159 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -197,7 +197,7 @@ class WikiControllerTest < ActionController::TestCase def test_destroy_child @request.session[:user_id] = 2 post :destroy, :project_id => 1, :page => 'Child_1' - assert_redirected_to :action => 'page_index', :project_id => 'ecookbook' + assert_redirected_to :action => 'index', :project_id => 'ecookbook' end def test_destroy_parent @@ -214,7 +214,7 @@ class WikiControllerTest < ActionController::TestCase assert_difference('WikiPage.count', -1) do post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'nullify' end - assert_redirected_to :action => 'page_index', :project_id => 'ecookbook' + assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) end @@ -223,7 +223,7 @@ class WikiControllerTest < ActionController::TestCase assert_difference('WikiPage.count', -3) do post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'destroy' end - assert_redirected_to :action => 'page_index', :project_id => 'ecookbook' + assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) assert_nil WikiPage.find_by_id(5) end @@ -233,15 +233,15 @@ class WikiControllerTest < ActionController::TestCase assert_difference('WikiPage.count', -1) do post :destroy, :project_id => 1, :page => 'Another_page', :todo => 'reassign', :reassign_to_id => 1 end - assert_redirected_to :action => 'page_index', :project_id => 'ecookbook' + assert_redirected_to :action => 'index', :project_id => 'ecookbook' assert_nil WikiPage.find_by_id(2) assert_equal WikiPage.find(1), WikiPage.find_by_id(5).parent end - def test_page_index - get :page_index, :project_id => 'ecookbook' + def test_index + get :index, :project_id => 'ecookbook' assert_response :success - assert_template 'page_index' + assert_template 'index' pages = assigns(:pages) assert_not_nil pages assert_equal Project.find(1).wiki.pages.size, pages.size diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index ea8c71b0a..c749f51e4 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -318,7 +318,7 @@ class RoutingTest < ActionController::IntegrationTest should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :page => 'CookBook_documentation', :version => '2', :version_from => '1' should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :page => 'CookBook_documentation', :version => '2' should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :page => 'ladida' - should_route :get, "/projects/567/wiki/page_index", :controller => 'wiki', :action => 'page_index', :project_id => '567' + should_route :get, "/projects/567/wiki/index", :controller => 'wiki', :action => 'index', :project_id => '567' should_route :get, "/projects/567/wiki/date_index", :controller => 'wiki', :action => 'date_index', :project_id => '567' should_route :get, "/projects/567/wiki/export", :controller => 'wiki', :action => 'export', :project_id => '567' |