diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index 5800307..1f014cd 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -193,12 +193,12 @@ class AttachmentsControllerTest < ActionController::TestCase end def test_show_text_file_should_send_if_too_big - Setting.file_max_size_displayed = 512 - Attachment.find(4).update_attribute :filesize, 754.kilobyte - - get :show, :id => 4 - assert_response :success - assert_equal 'application/x-ruby', @response.content_type + with_settings :file_max_size_displayed => 512 do + Attachment.find(4).update_attribute :filesize, 754.kilobyte + get :show, :id => 4 + assert_response :success + assert_equal 'application/x-ruby', @response.content_type + end set_tmp_attachments_directory end