From e124da5488291dc10fab0d17ebbf54b7f70b436b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 13 Sep 2014 10:17:15 +0000 Subject: Fixed: Files assigned to a version can not be deleted if Issue Tracking module is disabled (#17163). Patch by Michael Esemplare. git-svn-id: http://svn.redmine.org/redmine/trunk@13390 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/attachments_controller_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/functional') diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 068d84321..018f848d9 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -387,6 +387,16 @@ class AttachmentsControllerTest < ActionController::TestCase end end + def test_destroy_version_attachment_with_issue_tracking_disabled + Project.find(1).disable_module! :issue_tracking + set_tmp_attachments_directory + @request.session[:user_id] = 2 + assert_difference 'Attachment.count', -1 do + delete :destroy, :id => 9 + assert_response 302 + end + end + def test_destroy_without_permission set_tmp_attachments_directory assert_no_difference 'Attachment.count' do -- cgit v1.2.3