diff options
Diffstat (limited to 'test/controllers/content_controller_test.rb')
| -rw-r--r-- | test/controllers/content_controller_test.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/controllers/content_controller_test.rb b/test/controllers/content_controller_test.rb index 5bb02f3d..39fe276b 100644 --- a/test/controllers/content_controller_test.rb +++ b/test/controllers/content_controller_test.rb | |||
| @@ -239,17 +239,16 @@ class ContentControllerTest < ActionController::TestCase | |||
| 239 | end | 239 | end |
| 240 | 240 | ||
| 241 | def fill_pages_with_content | 241 | def fill_pages_with_content |
| 242 | d1 = find_or_create_draft(@first_child, @user1) | 242 | updates = Node.root.children.find_by(:slug => "updates") || |
| 243 | d1.title = "one" | 243 | Node.root.children.create!(:slug => "updates") |
| 244 | d1.tag_list = "update" | ||
| 245 | d1.save | ||
| 246 | @first_child.publish_draft! | ||
| 247 | 244 | ||
| 248 | d2 = find_or_create_draft(@second_child, @user1) | 245 | [["one", "aggregated_one"], ["two", "aggregated_two"]].each do |title, slug| |
| 249 | d2.title = "two" | 246 | node = updates.children.create!(:slug => slug) |
| 250 | d2.tag_list = "update" | 247 | draft = find_or_create_draft(node, @user1) |
| 251 | d2.save | 248 | draft.title = title |
| 252 | @second_child.publish_draft! | 249 | draft.tag_list = "update" |
| 250 | draft.save | ||
| 251 | node.publish_draft! | ||
| 252 | end | ||
| 253 | end | 253 | end |
| 254 | |||
| 255 | end | 254 | end |
