From a2bcc9c40eb99b901f2f92b2f4fa1f840583c6b8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 1 Oct 2016 12:46:29 +0000 Subject: Rename AttachmentsController#edit and #update to #edit_all and #update_all (#22356). git-svn-id: http://svn.redmine.org/redmine/trunk@15860 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/attachments_controller_test.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 6a44ca40c..665eb1d9d 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -354,9 +354,9 @@ class AttachmentsControllerTest < Redmine::ControllerTest puts '(ImageMagick convert not available)' end - def test_edit + def test_edit_all @request.session[:user_id] = 2 - get :edit, :object_type => 'issues', :object_id => '2' + get :edit_all, :object_type => 'issues', :object_id => '2' assert_response :success assert_select 'form[action=?]', '/attachments/issues/2' do @@ -371,24 +371,24 @@ class AttachmentsControllerTest < Redmine::ControllerTest end end - def test_edit_invalid_container_class_should_return_404 - get :edit, :object_type => 'nuggets', :object_id => '3' + def test_edit_all_with_invalid_container_class_should_return_404 + get :edit_all, :object_type => 'nuggets', :object_id => '3' assert_response 404 end - def test_edit_invalid_object_should_return_404 - get :edit, :object_type => 'issues', :object_id => '999' + def test_edit_all_with_invalid_object_should_return_404 + get :edit_all, :object_type => 'issues', :object_id => '999' assert_response 404 end - def test_edit_for_object_that_is_not_visible_should_return_403 - get :edit, :object_type => 'issues', :object_id => '4' + def test_edit_all_for_object_that_is_not_visible_should_return_403 + get :edit_all, :object_type => 'issues', :object_id => '4' assert_response 403 end - def test_update + def test_update_all @request.session[:user_id] = 2 - patch :update, :object_type => 'issues', :object_id => '2', :attachments => { + patch :update_all, :object_type => 'issues', :object_id => '2', :attachments => { '1' => {:filename => 'newname.text', :description => ''}, '4' => {:filename => 'newname.rb', :description => 'Renamed'}, } @@ -399,9 +399,9 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_equal 'Renamed', attachment.description end - def test_update_with_failure + def test_update_all_with_failure @request.session[:user_id] = 2 - patch :update, :object_type => 'issues', :object_id => '3', :attachments => { + patch :update_all, :object_type => 'issues', :object_id => '3', :attachments => { '1' => {:filename => '', :description => ''}, '4' => {:filename => 'newname.rb', :description => 'Renamed'}, } -- cgit v1.2.3