diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-29 19:46:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-29 19:46:58 +0000 |
commit | 9daf39ec5242a6a87efb9c862952e176d4314856 (patch) | |
tree | 78ac3c4012e88e4f907e0d5a075956402af67684 /test/functional | |
parent | 4b15dc10c10d9cb54d156457cc7d6823dac55520 (diff) | |
download | redmine-9daf39ec5242a6a87efb9c862952e176d4314856.tar.gz redmine-9daf39ec5242a6a87efb9c862952e176d4314856.zip |
Adds an optional description to attachments.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1180 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/documents_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index 7ba308ec5..f150a5b7a 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -44,7 +44,7 @@ class DocumentsControllerTest < Test::Unit::TestCase :document => { :title => 'DocumentsControllerTest#test_post_new', :description => 'This is a new document', :category_id => 2}, - :attachments => [ ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + '/files/testfile.txt', 'text/plain') ] + :attachments => {'1' => {'file' => test_uploaded_file('testfile.txt', 'text/plain')}} assert_redirected_to 'projects/ecookbook/documents' diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 4f28ab224..34b030d98 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -300,7 +300,7 @@ class IssuesControllerTest < Test::Unit::TestCase post :edit, :id => 1, :notes => '', - :attachments => [ test_uploaded_file('testfile.txt', 'text/plain') ] + :attachments => {'1' => {'file' => test_uploaded_file('testfile.txt', 'text/plain')}} assert_redirected_to 'issues/show/1' j = Issue.find(1).journals.find(:first, :order => 'id DESC') assert j.notes.blank? |