diff options
Diffstat (limited to 'test/functional/content_controller_test.rb')
| -rw-r--r-- | test/functional/content_controller_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/content_controller_test.rb b/test/functional/content_controller_test.rb index c374a83..2f390c6 100644 --- a/test/functional/content_controller_test.rb +++ b/test/functional/content_controller_test.rb | |||
| @@ -67,7 +67,29 @@ class ContentControllerTest < ActionController::TestCase | |||
| 67 | assert_select(".sidebar_headline", "two") | 67 | assert_select(".sidebar_headline", "two") |
| 68 | end | 68 | end |
| 69 | 69 | ||
| 70 | def test_nonexistant_custom_template_defaults_to_standard_template | ||
| 71 | new_node = create_node_under_root "fnord" | ||
| 72 | draft = new_node.find_or_create_draft @user1 | ||
| 73 | draft.template_name = "huchibu" | ||
| 74 | draft.save | ||
| 75 | new_node.publish_draft! | ||
| 76 | |||
| 77 | get :render_page, :locale => 'de', :page_path => ["fnord"] | ||
| 78 | assert_response :success | ||
| 79 | assert_template "custom/page_templates/public/render_page.html.erb" | ||
| 80 | end | ||
| 70 | 81 | ||
| 82 | def test_custom_template_no_date_and_author | ||
| 83 | new_node = create_node_under_root "fnord" | ||
| 84 | draft = new_node.find_or_create_draft @user1 | ||
| 85 | draft.template_name = "no_date_and_author" | ||
| 86 | draft.save | ||
| 87 | new_node.publish_draft! | ||
| 88 | |||
| 89 | get :render_page, :locale => 'de', :page_path => ["fnord"] | ||
| 90 | assert_response :success | ||
| 91 | assert_template "custom/page_templates/public/no_date_and_author.html.erb" | ||
| 92 | end | ||
| 71 | 93 | ||
| 72 | protected | 94 | protected |
| 73 | 95 | ||
