From: Jean-Philippe Lang Date: Sat, 10 Mar 2012 13:41:56 +0000 (+0000) Subject: More function tests for AdminController. X-Git-Tag: 1.4.0~178 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=25620a74293aa61137aebd267d9a07a936fcd476;p=redmine.git More function tests for AdminController. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9170 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index dea8b301e..2ba84179e 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -74,6 +74,15 @@ class AdminControllerTest < ActionController::TestCase assert IssueStatus.find_by_name('Nouveau') end + def test_load_default_configuration_data_should_rescue_error + delete_configuration_data + Redmine::DefaultData::Loader.stubs(:load).raises(Exception.new("Something went wrong")) + post :default_configuration, :lang => 'fr' + assert_response :redirect + assert_not_nil flash[:error] + assert_match /Something went wrong/, flash[:error] + end + def test_test_email get :test_email assert_redirected_to '/settings/edit?tab=notifications'