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