Better handling of attachments when issue validation fails (#10253).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8891 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-02-16 21:00:11 +00:00
parent a8f98bb749
commit d4e6355eb3
11 changed files with 265 additions and 49 deletions
+4
View File
@@ -38,6 +38,10 @@ class AttachmentTest < ActiveSupport::TestCase
set_tmp_attachments_directory
end
def test_container_for_new_attachment_should_be_nil
assert_nil Attachment.new.container
end
def test_create
a = Attachment.new(:container => Issue.find(1),
:file => uploaded_test_file("testfile.txt", "text/plain"),