diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-20 15:13:48 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-20 15:13:48 +0000 |
commit | 3bc29e29e091b56bcffeb07ffb9c37c328525f99 (patch) | |
tree | c10fba5f35f636f74683aac8ee0d2840b2a17308 /test/functional/news_controller_test.rb | |
parent | 1a4f5e87f2839fa2260deefd4d9a5c992ef860fe (diff) | |
download | redmine-3bc29e29e091b56bcffeb07ffb9c37c328525f99.tar.gz redmine-3bc29e29e091b56bcffeb07ffb9c37c328525f99.zip |
Refactor: split NewsController#new into #new and #create methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4163 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/news_controller_test.rb')
-rw-r--r-- | test/functional/news_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 3abb9a7fb..dd782fa3b 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -65,12 +65,12 @@ class NewsControllerTest < ActionController::TestCase assert_template 'new' end - def test_post_new + def test_post_create ActionMailer::Base.deliveries.clear Setting.notified_events << 'news_added' @request.session[:user_id] = 2 - post :new, :project_id => 1, :news => { :title => 'NewsControllerTest', + post :create, :project_id => 1, :news => { :title => 'NewsControllerTest', :description => 'This is the description', :summary => '' } assert_redirected_to 'projects/ecookbook/news' @@ -98,9 +98,9 @@ class NewsControllerTest < ActionController::TestCase assert_equal 'Description changed by test_post_edit', news.description end - def test_post_new_with_validation_failure + def test_post_create_with_validation_failure @request.session[:user_id] = 2 - post :new, :project_id => 1, :news => { :title => '', + post :create, :project_id => 1, :news => { :title => '', :description => 'This is the description', :summary => '' } assert_response :success |