Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 2
- Log:
Initial import of Instiki 0.11.0 sources from a downloaded Tarball.
Instiki is a Ruby On Rails based Wiki clone.
- Author:
- adh
- Date:
- Sat Jul 22 14:54:51 +0100 2006
- Size:
- 2138 Bytes
1 | #!/usr/bin/env ruby |
2 | |
3 | require File.dirname(__FILE__) + '/../test_helper' |
4 | |
5 | require 'action_controller/routing' |
6 | |
7 | class RoutesTest < Test::Unit::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 | end |
17 | |
18 | def test_parse_uri_interestng_cases |
19 | assert_routing('_veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery-long_web_/an_action/HomePage', |
20 | :web => '_veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery-long_web_', |
21 | :controller => 'wiki', |
22 | :action => 'an_action', :id => 'HomePage' |
23 | ) |
24 | assert_recognizes({:controller => 'wiki', :action => 'index'}, '///') |
25 | end |
26 | |
27 | def test_parse_uri_liberal_with_pagenames |
28 | |
29 | assert_routing('web/show/%24HOME_PAGE', |
30 | :controller => 'wiki', :web => 'web', :action => 'show', :id => '$HOME_PAGE') |
31 | |
32 | assert_routing('web/show/HomePage%3Farg1%3Dvalue1%26arg2%3Dvalue2', |
33 | :controller => 'wiki', :web => 'web', :action => 'show', |
34 | :id => 'HomePage?arg1=value1&arg2=value2') |
35 | |
36 | assert_routing('web/files/abc.zip', |
37 | :web => 'web', :controller => 'file', :action => 'file', :id => 'abc.zip') |
38 | assert_routing('web/import', :web => 'web', :controller => 'file', :action => 'import') |
39 | # default option is wiki |
40 | assert_recognizes({:controller => 'wiki', :web => 'unknown_path', :action => 'index', }, |
41 | 'unknown_path') |
42 | end |
43 | |
44 | def test_cases_broken_by_routes |
45 | # assert_routing('web/show/Page+With+Spaces', |
46 | # :controller => 'wiki', :web => 'web', :action => 'show', :id => 'Page With Spaces') |
47 | # assert_routing('web/show/HomePage%2Fsomething_else', |
48 | # :controller => 'wiki', :web => 'web', :action => 'show', :id => 'HomePage/something_else') |
49 | end |
50 | |
51 | end |