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