From cb2e86095e8c604eceda0f5e1f62910a05a6efcb Mon Sep 17 00:00:00 2001 From: hukl Date: Fri, 20 Feb 2009 09:11:12 +0100 Subject: fixed tests --- test/fixtures/pages.yml | 7 ++++- test/functional/content_controller_test.rb | 4 +-- test/functional/pages_controller_test.rb | 42 +----------------------------- 3 files changed, 9 insertions(+), 44 deletions(-) diff --git a/test/fixtures/pages.yml b/test/fixtures/pages.yml index cac254a..e6a46be 100644 --- a/test/fixtures/pages.yml +++ b/test/fixtures/pages.yml @@ -1 +1,6 @@ -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html \ No newline at end of file +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +one: + id: 1 + revision: 1 + node_id: 2 \ No newline at end of file diff --git a/test/functional/content_controller_test.rb b/test/functional/content_controller_test.rb index 93cbbb4..d64de60 100644 --- a/test/functional/content_controller_test.rb +++ b/test/functional/content_controller_test.rb @@ -3,8 +3,8 @@ require 'test_helper' class ContentControllerTest < ActionController::TestCase def test_custom_page_route - assert_recognizes({ :controller => 'content', :action => 'render_page', :language => 'de', :page_path => ['foo', 'bar'] }, '/de/foo/bar') - assert_recognizes({ :controller => 'content', :action => 'render_page', :language => 'en', :page_path => ['home'] }, '/en/home') + assert_recognizes({ :controller => 'content', :action => 'render_page', :locale => 'de', :page_path => ['foo', 'bar'] }, '/de/foo/bar') + assert_recognizes({ :controller => 'content', :action => 'render_page', :locale => 'en', :page_path => ['home'] }, '/en/home') end def test_render_404_when_no_page_was_found diff --git a/test/functional/pages_controller_test.rb b/test/functional/pages_controller_test.rb index 97ca1b6..3879014 100644 --- a/test/functional/pages_controller_test.rb +++ b/test/functional/pages_controller_test.rb @@ -1,45 +1,5 @@ require 'test_helper' class PagesControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:pages) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create page" do - assert_difference('Page.count') do - post :create, :page => { } - end - - assert_redirected_to page_path(assigns(:page)) - end - - test "should show page" do - get :show, :id => pages(:one).id - assert_response :success - end - - test "should get edit" do - get :edit, :id => pages(:one).id - assert_response :success - end - - test "should update page" do - put :update, :id => pages(:one).id, :page => { } - assert_redirected_to page_path(assigns(:page)) - end - - test "should destroy page" do - assert_difference('Page.count', -1) do - delete :destroy, :id => pages(:one).id - end - - assert_redirected_to pages_path - end + # will be removed anyway end -- cgit v1.3