diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-20 16:36:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-20 16:36:28 +0000 |
commit | e3e0f5440d0c92d42694f0567b53b4259a6d0473 (patch) | |
tree | 0f416156a2ed9a799da4012a95a081a069bef319 /test | |
parent | 252fde10d655923d7b25bf1ad6bc9084dec505c3 (diff) | |
download | redmine-e3e0f5440d0c92d42694f0567b53b4259a6d0473.tar.gz redmine-e3e0f5440d0c92d42694f0567b53b4259a6d0473.zip |
Extend Filesize in the attachments table for files with size > 2GB (#10672).
git-svn-id: http://svn.redmine.org/redmine/trunk@14709 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/attachment_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index ac09f5658..eaaa1459f 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -111,6 +111,17 @@ class AttachmentTest < ActiveSupport::TestCase end end + def test_filesize_greater_than_2gb_should_be_supported + with_settings :attachment_max_size => (50.gigabyte / 1024) do + a = Attachment.create!(:container => Issue.find(1), + :file => uploaded_test_file("testfile.txt", "text/plain"), + :author => User.find(1)) + a.filesize = 20.gigabyte + a.save! + assert_equal 20.gigabyte, a.reload.filesize + end + end + def test_description_length_should_be_validated a = Attachment.new(:description => 'a' * 300) assert !a.save |