Permalink
Browse files

[#506] Page#top_level_section fails

Write tests to confirm bug when you call #top_level_section on a page with a root parent.
  • Loading branch information...
1 parent 6734cc9 commit c15967199d31980102cf9ecf7e154bbf73a7c4da @peakpg peakpg committed May 10, 2012
Showing with 7 additions and 0 deletions.
  1. +2 −0 doc/release_notes.md
  2. +5 −0 test/unit/models/page_test.rb
View
@@ -42,6 +42,8 @@ Notable Fixes
* [#493] Add Mobile capability
* [#494] Speed up Cucumber Scenarios
* [#492] Upgrade to be Rails 3.2.x compatibile
+* [#509] Pagination works for custom blocks now
+* [#508] Remove fancy file upload (probably unused and wasn't working anyway)
v3.4.2
======
@@ -406,6 +406,11 @@ def setup
assert @baseball_page.in_section?("First Section")
end
+ test "#top_level_section works for page in root section" do
+ page = create(:public_page, :parent=>@root)
+ assert_equal @root, page.top_level_section
+ end
+
test "#top_level_section" do
assert_equal @football_section, @football_page.top_level_section
assert_equal @baseball_section, @baseball_page.top_level_section

0 comments on commit c159671

Please sign in to comment.