Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 2316 Bytes
- Properties:
- Property svn:executable is set
1 | # Unit tests for ApplicationController (the abstract controller class) |
2 | |
3 | require File.expand_path(File.dirname(__FILE__) + '/../test_helper') |
4 | require 'wiki_controller' |
5 | |
6 | # Need some concrete class to test the abstract class features |
7 | class WikiController; def rescue_action(e) logger.error(e); raise e end; end |
8 | |
9 | class ApplicationTest < ActionController::TestCase |
10 | fixtures :webs, :pages, :revisions, :system |
11 | |
12 | Mime::LOOKUP["text/html"] = HTML |
13 | |
14 | def setup |
15 | @controller = WikiController.new |
16 | @request = ActionController::TestRequest.new |
17 | @response = ActionController::TestResponse.new |
18 | @wiki = Wiki.new |
19 | end |
20 | |
21 | def test_utf8_header |
22 | get :show, :web => 'wiki1', :id => 'HomePage' |
23 | assert_equal 'text/html; charset=utf-8', @response.headers['Content-Type'] |
24 | end |
25 | |
26 | def test_mathplayer_mime_type |
27 | @request.user_agent = 'MathPlayer' |
28 | get :show, :web => 'wiki1', :id => 'HomePage' |
29 | assert_equal 'application/xhtml+xml', @response.headers['Content-Type'] |
30 | end |
31 | |
32 | def test_validator_mime_type |
33 | @request.user_agent = 'Validator' |
34 | get :show, :web => 'wiki1', :id => 'HomePage' |
35 | assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['Content-Type'] |
36 | end |
37 | |
38 | def test_accept_header_xhtml |
39 | @request.user_agent = 'Mozilla/5.0' |
40 | @request.env.update({'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' }) |
41 | get :show, :web => 'wiki1', :id => 'HomePage' |
42 | assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['Content-Type'] |
43 | end |
44 | |
45 | def test_accept_header_html |
46 | @request.user_agent = 'Foo' |
47 | @request.env.update({'HTTP_ACCEPT' => 'text/html,application/xml;q=0.9,*/*;q=0.8' }) |
48 | get :show, :web => 'wiki1', :id => 'HomePage' |
49 | assert_equal 'text/html; charset=utf-8', @response.headers['Content-Type'] |
50 | end |
51 | |
52 | def test_tex_mime_type |
53 | get :tex, :web => 'wiki1', :id => 'HomePage' |
54 | assert_equal 'text/plain; charset=utf-8', @response.headers['Content-Type'] |
55 | end |
56 | |
57 | def test_atom_mime_type |
58 | get :atom_with_content, :web => 'wiki1' |
59 | assert_equal 'application/atom+xml; charset=utf-8', @response.headers['Content-Type'] |
60 | end |
61 | |
62 | def test_connect_to_model_unknown_wiki |
63 | get :show, :web => 'unknown_wiki', :id => 'HomePage' |
64 | assert_response :missing |
65 | end |
66 | |
67 | end |