Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 377
- Log:
Various files are in the gem, but apparently not in the source distribution
on GitHub. These have been copied in from the working gem.
- Author:
- rool
- Date:
- Mon Mar 21 13:46:18 +0000 2011
- Size:
- 1137 Bytes
- Properties:
- Property svn:executable is set to *
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | |
3 | class ArchivePageTest < Test::Unit::TestCase |
4 | fixtures :pages |
5 | test_helper :pages |
6 | |
7 | def test_child_url |
8 | child = pages(:article) |
9 | assert_equal '/archive/2000/05/01/article/', child.url |
10 | end |
11 | |
12 | def test_child_url__nil_published_at_date |
13 | child = pages(:article_draft) |
14 | assert_nil child.published_at |
15 | assert_equal '/archive/' + Time.now.strftime('%Y/%m/%d') + '/draft/', child.url |
16 | end |
17 | |
18 | def test_find__year_index |
19 | expected = pages(:year_index) |
20 | year_index = Page.find_by_url('/archive/2000/') |
21 | assert_equal expected, year_index |
22 | end |
23 | def test_find__month_index |
24 | expected = pages(:month_index) |
25 | month_index = Page.find_by_url('/archive/2000/06/') |
26 | assert_equal expected, month_index |
27 | end |
28 | def test_find__day_index |
29 | expected = pages(:day_index) |
30 | day_index = Page.find_by_url('/archive/2000/06/09/') |
31 | assert_equal expected, day_index |
32 | end |
33 | |
34 | # Extracted from other unit tests |
35 | def test_find_by_url_with_archive |
36 | @page = pages(:homepage) |
37 | assert_equal pages(:article), @page.find_by_url('/archive/2000/05/01/article/') |
38 | end |
39 | |
40 | end |