diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-02 11:43:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-02 11:43:33 +0000 |
commit | 9634fe054ab83d9415ffd4e1f4d22330df1610d4 (patch) | |
tree | f8addc2677d9255344fa7783edb15b9456ed9cb3 /test/functional | |
parent | 9ffccf5304dccc86e0ed64c9f4791c527e52982d (diff) | |
download | redmine-9634fe054ab83d9415ffd4e1f4d22330df1610d4.tar.gz redmine-9634fe054ab83d9415ffd4e1f4d22330df1610d4.zip |
Adds a test for when updating a news fails.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9054 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/news_controller_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 490bb34a5..78e545d02 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -149,6 +149,14 @@ class NewsControllerTest < ActionController::TestCase assert_equal News.find(1), attachment.container end + def test_update_with_failure + @request.session[:user_id] = 2 + put :update, :id => 1, :news => { :description => '' } + assert_response :success + assert_template 'edit' + assert_error_tag :content => /description can't be blank/i + end + def test_destroy @request.session[:user_id] = 2 delete :destroy, :id => 1 |