From 144b18c5db61c53028177680295f3fc9d4e8711d Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 18 Jul 2009 18:17:06 +0200 Subject: Test::Unit Fixtures can't handle globalize2's translated attributes which is why its impossible to set translated attributes via fixtures. Therefor I removed the page fixtures entirely and and made sure that a title is set to "Untitled" when it is not specified otherwise. If a new node is created, its initial draft has "Untitled" set as title automatically. Modified tests accordingly --- test/functional/nodes_controller_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/functional') diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb index edc49b6..1c7e607 100644 --- a/test/functional/nodes_controller_test.rb +++ b/test/functional/nodes_controller_test.rb @@ -5,6 +5,7 @@ class NodesControllerTest < ActionController::TestCase include AuthenticatedTestHelper def test_get_index + Node.root.descendants.delete_all login_as :quentin get :index assert_response :success @@ -26,6 +27,9 @@ class NodesControllerTest < ActionController::TestCase login_as :quentin node = Node.find_by_unique_name("fourth_child") + node.pages.create + node.draft = node.pages.last + node.save assert_equal 1, node.pages.length -- cgit v1.3