summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-06-02 17:02:53 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-06-02 17:02:53 +0000
commitebb1a0092f91576647bec1238261382d57c14e15 (patch)
treefd1a3e83194841506bfa850540dda8ceec9ab55d
parentbe33ac6fc02ad906228b822f5edebac19ffcaa8a (diff)
downloadredmine-ebb1a0092f91576647bec1238261382d57c14e15.tar.gz
redmine-ebb1a0092f91576647bec1238261382d57c14e15.zip
use with_settings at AttachmentsControllerTest#test_show_text_file_should_send_if_too_big
git-svn-id: http://svn.redmine.org/redmine/trunk@13173 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/attachments_controller_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index 580030762..1f014cda0 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