From 25620a74293aa61137aebd267d9a07a936fcd476 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 10 Mar 2012 13:41:56 +0000 Subject: [PATCH] More function tests for AdminController. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9170 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/admin_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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' -- 2.39.5