]> source.dussan.org Git - redmine.git/commitdiff
Merged r10498 from trunk
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Sep 2012 00:17:59 +0000 (00:17 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Sep 2012 00:17:59 +0000 (00:17 +0000)
scm: git: use with_settings instead of assigned setting at functional test

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10499 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_git_controller_test.rb

index 38a2d5b1e57cda4518a799fc199f08737e4b1625..e8eb69f1875fb7c8e30f901e10780116631624f8 100644 (file)
@@ -53,8 +53,6 @@ class RepositoriesGitControllerTest < ActionController::TestCase
     if @char_1.respond_to?(:force_encoding)
       @char_1.force_encoding('UTF-8')
     end
-
-    Setting.default_language = 'en'
   end
 
   def test_create_and_update
@@ -320,10 +318,12 @@ class RepositoriesGitControllerTest < ActionController::TestCase
       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'