Checkout of Instiki Trunk 1/21/2007.
This commit is contained in:
commit
69b62b6f33
1138 changed files with 139586 additions and 0 deletions
30
test/functional/application_test.rb
Executable file
30
test/functional/application_test.rb
Executable file
|
@ -0,0 +1,30 @@
|
|||
# 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['Content-Type']
|
||||
end
|
||||
|
||||
def test_connect_to_model_unknown_wiki
|
||||
get :show, :web => 'unknown_wiki', :id => 'HomePage'
|
||||
assert_response :missing
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue