0
@@ -18,8 +18,8 @@ class SiteDropTest < Test::Unit::TestCase
0
def test_should_list_all_sections
0
- assert_models_equal [sections(:home), sections(:about), sections(:earth), sections(:europe), sections(:africa), sections(:bucharest), sections(:links)], @site.sections.collect(&:source)
0
- assert_equal [false, false, false, false, false, false, false], @site.sections.collect(&:current)
0
+ assert_models_equal [sections(:home), sections(:about), sections(:earth), sections(:europe), sections(:africa), sections(:bucharest), sections(:links), sections(:paged_section)], @site.sections.collect(&:source)
0
+ assert_equal [false, false, false, false, false, false, false, false], @site.sections.collect(&:current)
0
def test_should_default_to_no_current_section
0
@@ -30,7 +30,7 @@ class SiteDropTest < Test::Unit::TestCase
0
@site = SiteDrop.new(sites(:first), sections(:about))
0
@site.context = mock_context
0
assert_equal sections(:about), @site.current_section.source
0
- assert_equal [false, true, false, false, false, false, false
], @site.sections.collect(&:current)
0
+ assert_equal [false, true, false, false, false, false, false
, false], @site.sections.collect(&:current)
0
def test_should_list_only_blog_sections
0
@@ -38,7 +38,7 @@ class SiteDropTest < Test::Unit::TestCase
0
def test_should_list_only_paged_sections
0
- assert_models_equal [sections(:about), sections(:links)
], @site.page_sections.collect(&:source)
0
+ assert_models_equal [sections(:about), sections(:links)
, sections(:paged_section)], @site.page_sections.collect(&:source)
0
def test_should_list_tags
0
@@ -54,7 +54,7 @@ class SiteDropTest < Test::Unit::TestCase
0
def test_should_find_latest_articles
0
- assert_models_equal [contents(:welcome), contents(:about), contents(:site_map), contents(:another), contents(:at_beginning_of_next_month), contents(:a
t_end_of_month), contents(:at_middle_of_month), contents(:at_beginning_of_month)],
0
+ assert_models_equal [contents(:welcome), contents(:about), contents(:site_map), contents(:another), contents(:at_beginning_of_next_month), contents(:a
rticle_1_only_in_page_section), contents(:article_2_only_in_page_section), contents(:at_end_of_month), contents(:at_middle_of_month), contents(:at_beginning_of_month)],
0
@site.latest_articles.collect(&:source)
0
assert_models_equal [contents(:welcome), contents(:about)], @site.latest_articles(2).collect(&:source)
Comments
No one has commented yet.