summaryrefslogtreecommitdiff
path: root/test/functional/content_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/content_controller_test.rb')
-rw-r--r--test/functional/content_controller_test.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/test/functional/content_controller_test.rb b/test/functional/content_controller_test.rb
index c44b221..15e1299 100644
--- a/test/functional/content_controller_test.rb
+++ b/test/functional/content_controller_test.rb
@@ -7,15 +7,16 @@ class ContentControllerTest < ActionController::TestCase
7 assert_recognizes({ :controller => 'content', :action => 'render_page', :language => 'en', :pagepath => ['home'] }, '/en/home') 7 assert_recognizes({ :controller => 'content', :action => 'render_page', :language => 'en', :pagepath => ['home'] }, '/en/home')
8 end 8 end
9 9
10 # def test_rendering_a_page 10 def test_render_404_when_no_page_was_found
11 # Page.destroy_all 11 get :render_page, :language => 'de', :page_path => ["wrong_path"]
12 # load_atp 'content_controller' 12 assert_response 404
13 # Page.all.each {|x| x.update_unique_name; x.save} 13 end
14 # assert Page.valid? 14
15 # assert_not_nil Page.find_by_title("short name yo") 15 def test_rendering_a_page
16 # get :render_page, :language => 'de', :pagepath => ["shortname","barfoo"] 16 assert Node.valid?
17 # assert_response :success 17 assert_not_nil Node.find_by_slug("my_first_page")
18 # assert_template 'wtp_eins' 18 get :render_page, :language => 'de', :page_path => ["root", "my_first_page"]
19 # assert_equal "page_templates/layouts/screen", @response.layout 19 assert_response :success
20 # end 20 assert_equal "layouts/application", @response.layout
21 end
21end 22end