From ce9645d0092d42c7bf8781378181ffbd4ff3d088 Mon Sep 17 00:00:00 2001 From: hukl Date: Fri, 6 Feb 2009 21:48:41 +0100 Subject: added head id to node model which points to the head of the nodes pages collection. modified tests, importer etc renamed flags to tags --- test/functional/content_controller_test.rb | 4 +++- test/unit/node_test.rb | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/content_controller_test.rb b/test/functional/content_controller_test.rb index baf46b9..93cbbb4 100644 --- a/test/functional/content_controller_test.rb +++ b/test/functional/content_controller_test.rb @@ -15,7 +15,9 @@ class ContentControllerTest < ActionController::TestCase def test_rendering_a_page assert Node.valid? assert_not_nil first_child = Node.find_by_slug("first_child") - first_child.pages.create :title => "First Child" + page = first_child.pages.create :title => "First Child" + first_child.head = page + first_child.save! get :render_page, :language => 'de', :page_path => ["first_child"] assert_response :success diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb index 5325daa..a0fee7f 100644 --- a/test/unit/node_test.rb +++ b/test/unit/node_test.rb @@ -36,6 +36,9 @@ class NodeTest < ActiveSupport::TestCase foo.pages.create :title => "Version 2" foo.pages.create :title => "Version 3" + foo.head = foo.pages.last + foo.save! + page = Node.find_page("updates/2008/foo") assert_equal page, foo.pages.find_by_revision(3) end -- cgit v1.3