From f7618160ad0178b4ce2eb624cd0771acad227887 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 15 Feb 2012 21:42:34 +0000 Subject: [PATCH] use with_settings instead of direct "Setting" at "test_index" of functional issues controller test git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8885 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/issues_controller_test.rb | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 9a5a7cf29..6f1bea304 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -55,20 +55,20 @@ class IssuesControllerTest < ActionController::TestCase end def test_index - Setting.default_language = 'en' - - get :index - assert_response :success - assert_template 'index' - assert_not_nil assigns(:issues) - assert_nil assigns(:project) - assert_tag :tag => 'a', :content => /Can't print recipes/ - assert_tag :tag => 'a', :content => /Subproject issue/ - # private projects hidden - assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ - assert_no_tag :tag => 'a', :content => /Issue on project 2/ - # project column - assert_tag :tag => 'th', :content => /Project/ + with_settings :default_language => "en" do + get :index + assert_response :success + assert_template 'index' + assert_not_nil assigns(:issues) + assert_nil assigns(:project) + assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Subproject issue/ + # private projects hidden + assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ + assert_no_tag :tag => 'a', :content => /Issue on project 2/ + # project column + assert_tag :tag => 'th', :content => /Project/ + end end def test_index_should_not_list_issues_when_module_disabled