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:
- 2613 Bytes
1 | #!/usr/bin/env ruby |
2 | |
3 | require File.expand_path(File.dirname(__FILE__) + '/../test_helper') |
4 | |
5 | require 'action_controller/routing' |
6 | |
7 | class RoutesTest < ActionController::TestCase |
8 | |
9 | def test_parse_uri |
10 | assert_routing('', :controller => 'wiki', :action => 'index') |
11 | assert_routing('x', :controller => 'wiki', :action => 'index', :web => 'x') |
12 | assert_routing('x/y', :controller => 'wiki', :web => 'x', :action => 'y') |
13 | assert_routing('x/y/z', :controller => 'wiki', :web => 'x', :action => 'y', :id => 'z') |
14 | assert_recognizes({:web => 'x', :controller => 'wiki', :action => 'y'}, 'x/y/') |
15 | assert_recognizes({:web => 'x', :controller => 'wiki', :action => 'y', :id => 'z'}, 'x/y/z') |
16 | assert_recognizes({:web => 'x', :controller => 'wiki', :action => 'y', :id => 'z/'}, 'x/y/z/') |
17 | assert_recognizes({:web => 'x', :controller => 'wiki', :action => 'y', :id => 'z/'}, 'x/y/z%2F') |
18 | assert_recognizes({:web => 'x', :controller => 'wiki', :action => 'y', :id => 'z.w'}, 'x/y/z.w') |
19 | end |
20 | |
21 | def test_parse_uri_interestng_cases |
22 | assert_routing('_veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery-long_web_/an_action/HomePage', |
23 | :web => '_veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery-long_web_', |
24 | :controller => 'wiki', |
25 | :action => 'an_action', :id => 'HomePage' |
26 | ) |
27 | # assert_recognizes({:controller => 'wiki', :action => 'index'}, '///') |
28 | end |
29 | |
30 | def test_parse_uri_liberal_with_pagenames |
31 | |
32 | assert_routing('web/show/%24HOME_PAGE', |
33 | :controller => 'wiki', :web => 'web', :action => 'show', :id => '$HOME_PAGE') |
34 | |
35 | # assert_routing('web/show/HomePage%3F', |
36 | # :controller => 'wiki', :web => 'web', :action => 'show', |
37 | # :id => 'HomePage') |
38 | |
39 | # assert_routing('web/show/HomePage%3Farg1%3Dvalue1%26arg2%3Dvalue2', |
40 | # :controller => 'wiki', :web => 'web', :action => 'show', |
41 | # :id => 'HomePage?arg1=value1&arg2=value2') |
42 | |
43 | assert_routing('web/files/abc.zip', |
44 | :web => 'web', :controller => 'file', :action => 'file', :id => 'abc.zip') |
45 | assert_routing('web/import', :web => 'web', :controller => 'file', :action => 'import') |
46 | # default option is wiki |
47 | assert_recognizes({:controller => 'wiki', :web => 'unknown_path', :action => 'index', }, |
48 | 'unknown_path') |
49 | end |
50 | |
51 | def test_cases_broken_by_routes |
52 | assert_routing('web/show/Page+With+Spaces', |
53 | :controller => 'wiki', :web => 'web', :action => 'show', :id => 'Page With Spaces') |
54 | # assert_routing('web/show/HomePage%2Fsomething_else', |
55 | # :controller => 'wiki', :web => 'web', :action => 'show', :id => 'HomePage/something_else') |
56 | end |
57 | |
58 | end |