mirror of
https://github.com/redmine/redmine.git
synced 2026-07-07 17:13:29 +02:00
Merged r2797, r2804, r2814, r2820, r2837, r2838 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2881 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -118,6 +118,15 @@ class NewsControllerTest < Test::Unit::TestCase
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user