Rails 2.1 RC1

Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
This commit is contained in:
Jacques Distler 2008-05-17 23:22:34 -05:00
parent 14afed5893
commit 5292899c9a
971 changed files with 46318 additions and 17450 deletions

View file

@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '..', 'abstract_unit')
require 'abstract_unit'
module TestFileUtils
@ -27,7 +27,7 @@ class SendFileTest < Test::Unit::TestCase
include TestFileUtils
Mime::Type.register "image/png", :png unless defined? Mime::PNG
def setup
@controller = SendFileController.new
@request = ActionController::TestRequest.new
@ -55,7 +55,7 @@ class SendFileTest < Test::Unit::TestCase
assert_nothing_raised { response.body.call(response, output) }
assert_equal file_data, output.string
end
def test_file_url_based_filename
@controller.options = { :url_based_filename => true }
response = nil
@ -64,6 +64,17 @@ class SendFileTest < Test::Unit::TestCase
assert_equal "attachment", response.headers["Content-Disposition"]
end
def test_x_sendfile_header
@controller.options = { :x_sendfile => true }
response = nil
assert_nothing_raised { response = process('file') }
assert_not_nil response
assert_equal @controller.file_path, response.headers['X-Sendfile']
assert response.body.blank?
end
def test_data
response = nil
assert_nothing_raised { response = process('data') }