Update to Rails 2.3.9 and itextomml 1.3.27

This commit is contained in:
Jacques Distler 2010-09-05 15:24:15 -05:00
parent 113e0af736
commit ef30cc22df
200 changed files with 3065 additions and 1204 deletions

View file

@ -14,6 +14,10 @@ class MultipartParamsParsingTest < ActionController::IntegrationTest
def read
render :text => "File: #{params[:uploaded_data].read}"
end
def read_complex
render :text => "File: #{params[:level0][:level1][0][:file_data].read}"
end
end
FIXTURE_PATH = File.dirname(__FILE__) + '/../../fixtures/multipart'
@ -133,6 +137,17 @@ class MultipartParamsParsingTest < ActionController::IntegrationTest
end
end
test "uploads and reads file in complex parameter" do
with_test_routing do
post '/read_complex',
:level0 => {
:level1 => [ { :file_data => fixture_file_upload(FIXTURE_PATH + "/hello.txt", "text/plain") }
]
}
assert_equal "File: Hello", response.body
end
end
private
def fixture(name)
File.open(File.join(FIXTURE_PATH, name), 'rb') do |file|