diff options
| author | hukl <hukl@berlin.ccc.de> | 2009-01-29 22:12:11 +0100 |
|---|---|---|
| committer | hukl <hukl@berlin.ccc.de> | 2009-01-29 22:12:11 +0100 |
| commit | be47a4bbeac59d85af16b5e83e10ff242628519d (patch) | |
| tree | e25870a53dc19d10e7112ece98b82112d64cfe02 /test/functional | |
| parent | d4dfdb40329b8e15e6bba022b966984a8a994a87 (diff) | |
added node model to make basic functional tests pass. added awesome_nested_set plugin
Diffstat (limited to 'test/functional')
| -rw-r--r-- | test/functional/content_controller_test.rb | 23 |
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 | ||
| 21 | end | 22 | end |
