Upgrade to Rails 2.0.2

Upgraded to Rails 2.0.2, except that we maintain

   vendor/rails/actionpack/lib/action_controller/routing.rb

from Rail 1.2.6 (at least for now), so that Routes don't change. We still
get to enjoy Rails's many new features.

Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
This commit is contained in:
Jacques Distler 2007-12-21 01:48:59 -06:00
parent 0f6889e09f
commit 6873fc8026
1083 changed files with 52810 additions and 41058 deletions

View file

@ -19,7 +19,7 @@ class ApplicationTest < Test::Unit::TestCase
def test_utf8_header
get :show, :web => 'wiki1', :id => 'HomePage'
assert_equal 'text/html; charset=UTF-8', @response.headers['Content-Type']
assert_equal 'text/html; charset=UTF-8', @response.headers['type']
end
def test_connect_to_model_unknown_wiki

View file

@ -36,7 +36,7 @@ class FileControllerTest < Test::Unit::TestCase
assert_response(:success, bypass_body_parsing = true)
assert_equal "Contents of the file", r.body
assert_equal 'text/plain', r.headers['Content-Type']
assert_equal 'text/plain', r.headers['type']
end
def test_file_download_pdf_file
@ -47,7 +47,7 @@ class FileControllerTest < Test::Unit::TestCase
assert_response(:success, bypass_body_parsing = true)
assert_equal "aaa\nbbb\n", r.body
assert_equal 'application/pdf', r.headers['Content-Type']
assert_equal 'application/pdf', r.headers['type']
end
def test_pic_download_gif
@ -57,7 +57,7 @@ class FileControllerTest < Test::Unit::TestCase
r = get :file, :web => 'wiki1', :id => 'rails.gif'
assert_response(:success, bypass_body_parsing = true)
assert_equal 'image/gif', r.headers['Content-Type']
assert_equal 'image/gif', r.headers['type']
assert_equal pic.size, r.body.size
assert_equal pic, r.body
end

View file

@ -112,7 +112,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_html', 'web' => 'wiki1'
assert_response(:success, bypass_body_parsing = true)
assert_equal 'application/zip', r.headers['Content-Type']
assert_equal 'application/zip', r.headers['type']
assert_match /attachment; filename="wiki1-html-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@ -140,7 +140,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_html', 'web' => 'wiki1', 'layout' => 'no'
assert_response(:success, bypass_body_parsing = true)
assert_equal 'application/zip', r.headers['Content-Type']
assert_equal 'application/zip', r.headers['type']
assert_match /attachment; filename="wiki1-html-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@ -150,7 +150,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_markup', 'web' => 'wiki1'
assert_response(:success, bypass_body_parsing = true)
assert_equal 'application/zip', r.headers['Content-Type']
assert_equal 'application/zip', r.headers['type']
assert_match /attachment; filename="wiki1-markdownMML-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@ -162,7 +162,7 @@ class WikiControllerTest < Test::Unit::TestCase
# def test_export_pdf
# r = process 'export_pdf', 'web' => 'wiki1'
# assert_response(:success, bypass_body_parsing = true)
# assert_equal 'application/pdf', r.headers['Content-Type']
# assert_equal 'application/pdf', r.headers['type']
# assert_match /attachment; filename="wiki1-tex-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.pdf"/,
# r.headers['Content-Disposition']
# assert_equal '%PDF', r.body[0..3]
@ -179,7 +179,7 @@ class WikiControllerTest < Test::Unit::TestCase
# r = process 'export_tex', 'web' => 'wiki1'
#
# assert_response(:success, bypass_body_parsing = true)
# assert_equal 'application/octet-stream', r.headers['Content-Type']
# assert_equal 'application/octet-stream', r.headers['type']
# assert_match /attachment; filename="wiki1-tex-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.tex"/,
# r.headers['Content-Disposition']
# assert_equal '\documentclass', r.body[0..13], 'Content is not a TeX file'
@ -259,7 +259,7 @@ class WikiControllerTest < Test::Unit::TestCase
# assert_equal '%PDF', r.body[0..3]
# assert_equal "EOF\n", r.body[-4..-1]
#
# assert_equal 'application/pdf', r.headers['Content-Type']
# assert_equal 'application/pdf', r.headers['type']
# assert_match /attachment; filename="HomePage-wiki1-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.pdf"/,
# r.headers['Content-Disposition']
# end
@ -633,8 +633,8 @@ class WikiControllerTest < Test::Unit::TestCase
end
def test_show_page
r = process('show', 'id' => 'Oak', 'web' => 'wiki1')
assert_response(:success)
r = process 'show', 'id' => 'Oak', 'web' => 'wiki1'
assert_response :success
assert_tag :content => /All about oak/
end
@ -644,7 +644,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process('show', 'id' => 'HomePage', 'web' => 'wiki1')
assert_response(:success)
assert_response :success
assert_match /Second revision of the <a.*HomePage.*<\/a> end/, r.body
end