summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/content_controller_test.rb4
-rw-r--r--test/unit/node_test.rb3
2 files changed, 6 insertions, 1 deletions
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
15 def test_rendering_a_page 15 def test_rendering_a_page
16 assert Node.valid? 16 assert Node.valid?
17 assert_not_nil first_child = Node.find_by_slug("first_child") 17 assert_not_nil first_child = Node.find_by_slug("first_child")
18 first_child.pages.create :title => "First Child" 18 page = first_child.pages.create :title => "First Child"
19 first_child.head = page
20 first_child.save!
19 21
20 get :render_page, :language => 'de', :page_path => ["first_child"] 22 get :render_page, :language => 'de', :page_path => ["first_child"]
21 assert_response :success 23 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
36 foo.pages.create :title => "Version 2" 36 foo.pages.create :title => "Version 2"
37 foo.pages.create :title => "Version 3" 37 foo.pages.create :title => "Version 3"
38 38
39 foo.head = foo.pages.last
40 foo.save!
41
39 page = Node.find_page("updates/2008/foo") 42 page = Node.find_page("updates/2008/foo")
40 assert_equal page, foo.pages.find_by_revision(3) 43 assert_equal page, foo.pages.find_by_revision(3)
41 end 44 end