@@ -75,7 +75,7 class AttachmentTest < ActiveSupport::TestCase | |||||
75 | 'description' => 'test' |
|
75 | 'description' => 'test' | |
76 | }) |
|
76 | }) | |
77 | end |
|
77 | end | |
78 |
|
78 | |||
79 | attachment = Attachment.first(:order => 'id DESC') |
|
79 | attachment = Attachment.first(:order => 'id DESC') | |
80 | assert_equal issue, attachment.container |
|
80 | assert_equal issue, attachment.container | |
81 | assert_equal 'testfile.txt', attachment.filename |
|
81 | assert_equal 'testfile.txt', attachment.filename | |
@@ -85,7 +85,7 class AttachmentTest < ActiveSupport::TestCase | |||||
85 | assert File.exists?(attachment.diskfile) |
|
85 | assert File.exists?(attachment.diskfile) | |
86 | assert_equal 59, File.size(attachment.diskfile) |
|
86 | assert_equal 59, File.size(attachment.diskfile) | |
87 | end |
|
87 | end | |
88 |
|
88 | |||
89 | should "add unsaved files to the object as unsaved attachments" do |
|
89 | should "add unsaved files to the object as unsaved attachments" do | |
90 | # Max size of 0 to force Attachment creation failures |
|
90 | # Max size of 0 to force Attachment creation failures | |
91 | with_settings(:attachment_max_size => 0) do |
|
91 | with_settings(:attachment_max_size => 0) do |
General Comments 0
You need to be logged in to leave comments.
Login now