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:
- 1950 Bytes
1 | require File.dirname(__FILE__) + '/../../test_helper' |
2 | require 'admin/users_controller' |
3 | |
4 | # Re-raise errors caught by the controller. |
5 | class Admin::UsersController; def rescue_action(e) raise e end; end |
6 | |
7 | class Admin::UsersControllerTest < Test::Unit::TestCase |
8 | fixtures :users, :blogs |
9 | |
10 | def setup |
11 | @controller = Admin::UsersController.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 | assert_template_has 'users' |
22 | end |
23 | |
24 | def test_list |
25 | get :list |
26 | assert_template 'list' |
27 | assert_template_has 'users' |
28 | end |
29 | |
30 | def test_new |
31 | get :new |
32 | assert_template 'new' |
33 | |
34 | post :new, :user => { :login => 'errand', :email => 'corey@test.com', |
35 | :password => 'testpass', :password_confirmation => 'testpass' } |
36 | assert_response :redirect, :action => 'list' |
37 | follow_redirect |
38 | assert_template 'list' |
39 | end |
40 | |
41 | def test_show |
42 | get :show, :id => 1 |
43 | assert_template 'show' |
44 | assert_valid assigns(:user) |
45 | |
46 | assert_template_has 'user' |
47 | assert_template_has 'articles' |
48 | end |
49 | |
50 | def test_edit |
51 | get :edit, :id => 1 |
52 | assert_template 'edit' |
53 | assert_valid assigns(:user) |
54 | |
55 | post :edit, :id => 1, :user => { :login => 'errand', |
56 | :email => 'corey@test.com', :password => 'testpass', |
57 | :password_confirmation => 'testpass' } |
58 | assert_response :redirect, :action => 'show' |
59 | follow_redirect |
60 | assert_template 'show' |
61 | assert_valid assigns(:user) |
62 | end |
63 | |
64 | def test_destroy |
65 | user_count = User.count |
66 | get :destroy, :id => users(:bob).id |
67 | assert_template 'destroy' |
68 | assert_valid assigns(:user) |
69 | |
70 | assert_equal user_count, User.count |
71 | post :destroy, :id => users(:bob).id |
72 | assert_response :redirect, :action => 'list' |
73 | follow_redirect |
74 | assert_template 'list' |
75 | assert_equal user_count - 1, User.count |
76 | end |
77 | |
78 | end |