From c7c4b007621fd28c88b65db5fd3296ef730097d9 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 17 Oct 2009 23:31:28 +0200 Subject: added some more validations to ensure data integrity and applied necessary changes on tests --- test/test_helper.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 21d4604..023ed96 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -38,4 +38,18 @@ class ActiveSupport::TestCase fixtures :all # Add more helper methods to be used by all tests here... + + def create_node_with_published_page + node = create_node_with_draft + draft = node.draft + draft.title = "Test" + draft.abstract = "Test" + draft.body = "Test" + node.publish_draft! + node + end + + def create_node_with_draft + Node.root.children.create :slug => "test_node" + end end -- cgit v1.3