Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 1527 Bytes
1 | require File.dirname(__FILE__) + '/../../test_helper' |
2 | require 'admin/blacklist_controller' |
3 | |
4 | # Re-raise errors caught by the controller. |
5 | class Admin::BlacklistController; def rescue_action(e) raise e end; end |
6 | |
7 | class Admin::BlacklistControllerTest < Test::Unit::TestCase |
8 | fixtures :blacklist_patterns, :users |
9 | |
10 | def setup |
11 | @controller = Admin::BlacklistController.new |
12 | @request = ActionController::TestRequest.new |
13 | @response = ActionController::TestResponse.new |
14 | |
15 | @request.session = { :user => users(:tobi) } |
16 | end |
17 | |
18 | def test_index |
19 | get :index |
20 | assert_template 'list' |
21 | end |
22 | |
23 | def test_list |
24 | get :list |
25 | assert_template 'list' |
26 | assert_template_has 'blacklist_patterns' |
27 | end |
28 | |
29 | def test_create |
30 | num_blacklist_patterns = BlacklistPattern.count |
31 | |
32 | post :new, 'blacklist_pattern' => { } |
33 | assert_response :redirect, :action => 'list' |
34 | |
35 | assert_equal num_blacklist_patterns + 1, BlacklistPattern.count |
36 | end |
37 | |
38 | def test_edit |
39 | get :edit, 'id' => 1 |
40 | assert_template 'edit' |
41 | assert_template_has('blacklist_pattern') |
42 | assert_valid assigns(:blacklist_pattern) |
43 | end |
44 | |
45 | def test_update |
46 | post :edit, 'id' => 1 |
47 | assert_response :redirect, :action => 'list' |
48 | end |
49 | |
50 | def test_destroy |
51 | assert_not_nil BlacklistPattern.find(1) |
52 | |
53 | get :destroy, 'id' => 1 |
54 | assert_response :success |
55 | |
56 | post :destroy, 'id' => 1 |
57 | assert_response :redirect, :action => 'list' |
58 | |
59 | assert_raise(ActiveRecord::RecordNotFound) { |
60 | blacklist_pattern = BlacklistPattern.find(1) |
61 | } |
62 | end |
63 | end |