summaryrefslogtreecommitdiff
path: root/test/unit/page_test.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-11-15 14:31:52 +0100
committerhukl <contact@smyck.org>2009-11-15 14:31:52 +0100
commit1de97a5ac6f4621f8013d6f73c6c9edfae445b70 (patch)
treeee500916af41898ff2ecaf5c8567acf7cfd0f867 /test/unit/page_test.rb
parent713f8f76e2ae1635bb938de6d8c74587d842790f (diff)
removed date and author from the standard template and introduced a dedicated update template which will get auto assigned if a node is created under updates/<year>/<slug>
Added tests and convenient method
Diffstat (limited to 'test/unit/page_test.rb')
-rw-r--r--test/unit/page_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb
index c2599e3..bb82da0 100644
--- a/test/unit/page_test.rb
+++ b/test/unit/page_test.rb
@@ -134,4 +134,13 @@ class PageTest < ActiveSupport::TestCase
134 assert_equal 1, Page.find_with_outdated_translations(:delta_time => 23.minutes).count 134 assert_equal 1, Page.find_with_outdated_translations(:delta_time => 23.minutes).count
135 assert_equal 2, Page.count 135 assert_equal 2, Page.count
136 end 136 end
137
138 test "pages under /updates node get the update template assigned" do
139 Node.root.descendants.delete_all
140 updates = Node.root.children.create!( :slug => "updates" )
141 updates2009 = updates.children.create!( :slug => "2009" )
142 update = updates2009.children.create!( :slug => "my-first-update" )
143 assert_equal "update", update.draft.template_name
144 end
145
137end 146end