6873fc8026
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).
30 lines
885 B
Ruby
Executable file
30 lines
885 B
Ruby
Executable file
# Unit tests for ApplicationController (the abstract controller class)
|
|
|
|
require File.dirname(__FILE__) + '/../test_helper'
|
|
require 'wiki_controller'
|
|
require 'rexml/document'
|
|
|
|
# Need some concrete class to test the abstract class features
|
|
class WikiController; def rescue_action(e) logger.error(e); raise e end; end
|
|
|
|
class ApplicationTest < Test::Unit::TestCase
|
|
fixtures :webs, :pages, :revisions, :system
|
|
|
|
def setup
|
|
@controller = WikiController.new
|
|
@request = ActionController::TestRequest.new
|
|
@response = ActionController::TestResponse.new
|
|
@wiki = Wiki.new
|
|
end
|
|
|
|
def test_utf8_header
|
|
get :show, :web => 'wiki1', :id => 'HomePage'
|
|
assert_equal 'text/html; charset=UTF-8', @response.headers['type']
|
|
end
|
|
|
|
def test_connect_to_model_unknown_wiki
|
|
get :show, :web => 'unknown_wiki', :id => 'HomePage'
|
|
assert_response :missing
|
|
end
|
|
|
|
end
|