Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 71
- Log:
Start of upgrade to Typo 4.0.0, the latest stable release since
2.6.0. Note test/mocks/themes/azure changes from a file to a
directory, so the file has been removed in this revision and
the directory will be added in the next revision.
- Author:
- adh
- Date:
- Mon Aug 07 22:18:11 +0100 2006
- Size:
- 1182 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'page' |
3 | class Page |
4 | def tickle |
5 | self.body = "I got tickled!" |
6 | self.save! |
7 | end |
8 | end |
9 | |
10 | class TriggerTest < Test::Unit::TestCase |
11 | fixtures :contents |
12 | |
13 | def test_post_action |
14 | assert Trigger.post_action(Time.now + 2.seconds, |
15 | contents(:first_page), |
16 | 'tickle') |
17 | assert_equal "ho ho ho", Page.find(contents(:first_page).id).body |
18 | sleep 3 |
19 | assert Trigger.fire |
20 | assert_equal 0, Trigger.count |
21 | assert_equal "I got tickled!", Page.find(contents(:first_page).id).body |
22 | end |
23 | |
24 | def test_post_immediate_action |
25 | assert Trigger.post_action(Time.now, |
26 | contents(:first_page), |
27 | 'tickle') |
28 | assert_equal "I got tickled!", Page.find(contents(:first_page).id).body |
29 | assert_equal 0, Trigger.count |
30 | end |
31 | |
32 | def test_post_future_action |
33 | assert Trigger.post_action(Time.now + 1.hour, |
34 | contents(:first_page), |
35 | 'tickle') |
36 | assert_equal "ho ho ho", Page.find(contents(:first_page).id).body |
37 | assert_equal 1, Trigger.count |
38 | end |
39 | |
40 | end |