Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 1945 Bytes
1 | require File.dirname(__FILE__) + '/../../test_helper' |
2 | require 'admin/trackbacks_controller' |
3 | |
4 | # Re-raise errors caught by the controller. |
5 | class Admin::TrackbacksController; def rescue_action(e) raise e end; end |
6 | |
7 | class Admin::TrackbacksControllerTest < Test::Unit::TestCase |
8 | fixtures :contents, :users |
9 | |
10 | def setup |
11 | @controller = Admin::TrackbacksController.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, :article_id => 2 |
20 | assert_rendered_file 'list' |
21 | end |
22 | |
23 | def test_list |
24 | get :list, :article_id => 2 |
25 | assert_rendered_file 'list' |
26 | assert_template_has 'trackbacks' |
27 | end |
28 | |
29 | def test_show |
30 | get :show, :id => 7, :article_id => 2 |
31 | assert_rendered_file 'show' |
32 | assert_template_has 'trackback' |
33 | assert_valid_record 'trackback' |
34 | end |
35 | |
36 | def test_new |
37 | get :new, :article_id => 2 |
38 | assert_rendered_file 'new' |
39 | assert_template_has 'trackback' |
40 | end |
41 | |
42 | def test_create |
43 | num_trackbacks = Trackback.find_all.size |
44 | |
45 | post :new, :trackback => { 'title' => 'title', 'excerpt' => 'excerpt', 'blog_name' => 'blog_name', 'url' => 'url' }, :article_id => 2 |
46 | assert_redirected_to :action => 'show' |
47 | |
48 | assert_equal num_trackbacks + 1, Trackback.find_all.size |
49 | end |
50 | |
51 | def test_edit |
52 | get :edit, :id => 7, :article_id => 2 |
53 | assert_rendered_file 'edit' |
54 | assert_template_has 'trackback' |
55 | assert_valid_record 'trackback' |
56 | end |
57 | |
58 | def test_update |
59 | post :edit, :id => 7, :article_id => 2 |
60 | assert_redirected_to :action => 'show', :id => 7 |
61 | end |
62 | |
63 | def test_destroy |
64 | assert_not_nil Trackback.find(7) |
65 | |
66 | get :destroy, :id => 7, :article_id => 2 |
67 | assert_success |
68 | |
69 | post :destroy, :id => 7, :article_id => 2 |
70 | assert_redirected_to :action => 'list' |
71 | |
72 | assert_raise(ActiveRecord::RecordNotFound) { |
73 | trackback = Trackback.find(7) |
74 | } |
75 | end |
76 | end |