diff options
Diffstat (limited to 'test/test_helper.rb')
| -rw-r--r-- | test/test_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 | |||
| 38 | fixtures :all | 38 | fixtures :all |
| 39 | 39 | ||
| 40 | # Add more helper methods to be used by all tests here... | 40 | # Add more helper methods to be used by all tests here... |
| 41 | |||
| 42 | def create_node_with_published_page | ||
| 43 | node = create_node_with_draft | ||
| 44 | draft = node.draft | ||
| 45 | draft.title = "Test" | ||
| 46 | draft.abstract = "Test" | ||
| 47 | draft.body = "Test" | ||
| 48 | node.publish_draft! | ||
| 49 | node | ||
| 50 | end | ||
| 51 | |||
| 52 | def create_node_with_draft | ||
| 53 | Node.root.children.create :slug => "test_node" | ||
| 54 | end | ||
| 41 | end | 55 | end |
