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:
- 1145 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | |
3 | class CategoryTest < Test::Unit::TestCase |
4 | fixtures :contents, :categories, :articles_categories |
5 | |
6 | def setup |
7 | @category = Category.find(1) |
8 | end |
9 | |
10 | def test_truth |
11 | assert_kind_of Category, @category |
12 | end |
13 | |
14 | def test_find_all_with_article_counters |
15 | c = Category.find_all_with_article_counters |
16 | |
17 | assert_equal categories(:software), c[0] |
18 | assert_equal categories(:hardware), c[1] |
19 | assert_equal categories(:personal), c[2] |
20 | |
21 | assert_equal 1, c[0].article_counter |
22 | assert_equal 1, c[1].article_counter |
23 | assert_equal 3, c[2].article_counter |
24 | end |
25 | |
26 | def test_reorder |
27 | assert_equal categories(:software), Category.find(:first, :order => :position) |
28 | Category.reorder([categories(:personal).id, categories(:hardware).id, categories(:software).id]) |
29 | assert_equal categories(:personal), Category.find(:first, :order => :position) |
30 | end |
31 | |
32 | def test_reorder_alpha |
33 | assert_equal categories(:software), Category.find(:first, :order => :position) |
34 | Category.reorder_alpha |
35 | assert_equal categories(:hardware), Category.find(:first, :order => :position) |
36 | end |
37 | end |