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:
- 2268 Bytes
1 | require File.dirname(__FILE__) + '/../../test_helper' |
2 | |
3 | class FeedbackStatesTest < Test::Unit::TestCase |
4 | fixtures :blogs, :contents, :articles_tags, :tags, :resources, |
5 | :categories, :categorizations, :users, :notifications, :text_filters |
6 | |
7 | def setup |
8 | @comment = Article.find(:first).comments.build(:author => 'Piers', |
9 | :body => 'Body') |
10 | end |
11 | |
12 | def test_ham_all_the_way |
13 | assert_state ContentState::Unclassified |
14 | assert @comment.published? |
15 | assert @comment.just_published? |
16 | assert @comment.just_changed_published_status? |
17 | assert @comment.save |
18 | assert @comment.just_changed_published_status? |
19 | assert @comment.just_published? |
20 | @comment.reload |
21 | assert ! @comment.just_changed_published_status? |
22 | assert ! @comment.just_published? |
23 | @comment.confirm_classification |
24 | assert @comment.published? |
25 | assert ! @comment.just_published? |
26 | assert ! @comment.just_changed_published_status? |
27 | end |
28 | |
29 | def test_spam_all_the_way |
30 | class << @comment |
31 | def classify |
32 | :spam |
33 | end |
34 | end |
35 | assert_state ContentState::Unclassified |
36 | assert ! @comment.published? |
37 | assert ! @comment.just_published? |
38 | assert ! @comment.just_changed_published_status? |
39 | assert @comment.save |
40 | assert ! @comment.published? |
41 | assert ! @comment.just_published? |
42 | assert ! @comment.just_changed_published_status? |
43 | @comment.reload |
44 | assert ! @comment.just_changed_published_status? |
45 | assert ! @comment.just_published? |
46 | @comment.confirm_classification |
47 | assert ! @comment.published? |
48 | assert ! @comment.just_published? |
49 | assert ! @comment.just_changed_published_status? |
50 | end |
51 | |
52 | def test_presumed_spam_marked_as_ham |
53 | @comment.state = ContentState::PresumedSpam.instance |
54 | @comment.mark_as_ham |
55 | assert @comment.published? |
56 | assert @comment.just_published? |
57 | assert @comment.just_changed_published_status? |
58 | end |
59 | |
60 | def test_presumed_ham_marked_as_spam |
61 | @comment.state = ContentState::PresumedHam.instance |
62 | @comment.mark_as_spam |
63 | assert ! @comment.published? |
64 | assert ! @comment.just_published? |
65 | assert @comment.just_changed_published_status? |
66 | end |
67 | |
68 | def assert_state(state) |
69 | assert_instance_of state, @comment.state |
70 | end |
71 | end |