move to AR
This commit is contained in:
parent
c4b7b2d9f2
commit
26c046cdfa
51 changed files with 2345 additions and 516 deletions
|
@ -8,24 +8,23 @@ require 'rexml/document'
|
|||
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
|
||||
setup_test_wiki
|
||||
setup_controller_test(WikiController)
|
||||
@controller = WikiController.new
|
||||
@request = ActionController::TestRequest.new
|
||||
@response = ActionController::TestResponse.new
|
||||
@wiki = Wiki.new
|
||||
end
|
||||
|
||||
def tear_down
|
||||
tear_down_wiki
|
||||
end
|
||||
|
||||
|
||||
def test_utf8_header
|
||||
r = process('show', 'web' => 'wiki1', 'id' => 'HomePage')
|
||||
assert_equal 'text/html; charset=UTF-8', r.headers['Content-Type']
|
||||
get :show, :web => 'wiki1', :id => 'HomePage'
|
||||
assert_equal 'text/html; charset=UTF-8', @response.headers['Content-Type']
|
||||
end
|
||||
|
||||
def test_connect_to_model_unknown_wiki
|
||||
r = process('show', 'web' => 'unknown_wiki', 'id' => 'HomePage')
|
||||
assert_equal 404, r.response_code
|
||||
get :show, :web => 'unknown_wiki', :id => 'HomePage'
|
||||
assert_response :missing
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue