summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-16 08:49:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-16 08:49:38 +0000
commitae7852adac36bbeaa799f0db043cc14b3c64c849 (patch)
tree5287d45f925143e2cf38cc12519947b74a4fdfc2 /test
parentd74bc734f315ddad333477f2d8b71e33051b6278 (diff)
downloadredmine-ae7852adac36bbeaa799f0db043cc14b3c64c849.tar.gz
redmine-ae7852adac36bbeaa799f0db043cc14b3c64c849.zip
Test cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@16085 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/attachment_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb
index 57c457f88..af983a211 100644
--- a/test/unit/attachment_test.rb
+++ b/test/unit/attachment_test.rb
@@ -82,8 +82,7 @@ class AttachmentTest < ActiveSupport::TestCase
end
def test_shorted_filename_if_too_long
- file = uploaded_test_file("testfile.txt", "text/plain")
- file.instance_variable_set('@original_filename', "#{'a'*251}.txt")
+ file = mock_file_with_options(:original_filename => "#{'a'*251}.txt")
assert_equal 255, file.original_filename.length
a = Attachment.new(:container => Issue.find(1),
@@ -92,6 +91,7 @@ class AttachmentTest < ActiveSupport::TestCase
assert a.save
a.reload
assert_equal 12 + 1 + 32 + 4, a.disk_filename.length
+ assert_equal 255, a.filename.length
end
def test_copy_should_preserve_attributes