scm: git: use with_settings instead of assigned setting at functional test

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10498 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-09-27 23:16:56 +00:00
parent b6be866151
commit 1efd303b4a
1 changed files with 6 additions and 6 deletions

View File

@ -53,8 +53,6 @@ class RepositoriesGitControllerTest < ActionController::TestCase
if @char_1.respond_to?(:force_encoding) if @char_1.respond_to?(:force_encoding)
@char_1.force_encoding('UTF-8') @char_1.force_encoding('UTF-8')
end end
Setting.default_language = 'en'
end end
def test_create_and_update def test_create_and_update
@ -320,10 +318,12 @@ class RepositoriesGitControllerTest < ActionController::TestCase
with_settings :diff_max_lines_displayed => 5 do with_settings :diff_max_lines_displayed => 5 do
# Truncated diff of changeset 2f9c0091 # Truncated diff of changeset 2f9c0091
with_cache do with_cache do
get :diff, :id => PRJ_ID, :type => 'inline', with_settings :default_language => 'en' do
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7' get :diff, :id => PRJ_ID, :type => 'inline',
assert_response :success :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
assert @response.body.include?("... This diff was truncated") assert_response :success
assert @response.body.include?("... This diff was truncated")
end
with_settings :default_language => 'fr' do with_settings :default_language => 'fr' do
get :diff, :id => PRJ_ID, :type => 'inline', get :diff, :id => PRJ_ID, :type => 'inline',
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7' :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'