diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-22 16:25:09 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-22 16:25:09 +0000 |
commit | 1f2f9536875a0383f0ac61e0fdd089b666c96070 (patch) | |
tree | 856bfa4645d723b5eb39c754369fa1a00d3ccd86 /test/functional/news_controller_test.rb | |
parent | 3b20774c543d33afe10ff794ee8382f1d8e017e9 (diff) | |
download | redmine-1f2f9536875a0383f0ac61e0fdd089b666c96070.tar.gz redmine-1f2f9536875a0383f0ac61e0fdd089b666c96070.zip |
Refactor: move NewsController#add_comment to CommentsController#create
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4170 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/news_controller_test.rb')
-rw-r--r-- | test/functional/news_controller_test.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 5f00fd914..ddc8b0c2c 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -111,26 +111,6 @@ class NewsControllerTest < ActionController::TestCase :content => /1 error/ end - def test_add_comment - @request.session[:user_id] = 2 - post :add_comment, :id => 1, :comment => { :comments => 'This is a NewsControllerTest comment' } - assert_redirected_to 'news/1' - - comment = News.find(1).comments.find(:first, :order => 'created_on DESC') - assert_not_nil comment - assert_equal 'This is a NewsControllerTest comment', comment.comments - assert_equal User.find(2), comment.author - end - - def test_empty_comment_should_not_be_added - @request.session[:user_id] = 2 - assert_no_difference 'Comment.count' do - post :add_comment, :id => 1, :comment => { :comments => '' } - assert_response :success - assert_template 'show' - end - end - def test_destroy_comment comments_count = News.find(1).comments.size @request.session[:user_id] = 2 |