From 5995bbecf36b1d5abfd8f16ae1efaf14604444f8 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Fri, 30 Nov 2007 21:35:40 +0000 Subject: [PATCH] ActionItem21: testing the (actual) creation of a new article --- app/controllers/my_profile/cms_controller.rb | 1 + test/functional/cms_controller_test.rb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index bd4d39f..f7a3c26 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -43,6 +43,7 @@ class CmsController < MyProfileController if request.post? if @article.save redirect_to :action => 'view', :id => @article.id + return end end diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 8907d0a..0c733fe 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -61,7 +61,9 @@ class CmsControllerTest < Test::Unit::TestCase end should 'be able to save a save a document' do - flunk 'pending' + assert_difference Article, :count do + post :new, :profile => profile.identifier, :article => { :name => 'a test article', :body => 'the text of the article ...' } + end end should 'be able to set home page' do -- libgit2 0.21.2