summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_git_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/repositories_git_controller_test.rb')
-rw-r--r--test/functional/repositories_git_controller_test.rb29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 00243a3d4..169fec7b3 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -316,21 +316,22 @@ class RepositoriesGitControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- Setting.diff_max_lines_displayed = 5
- # 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")
-
- Setting.default_language = 'fr'
- get :diff, :id => PRJ_ID, :type => 'inline',
- :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
- assert_response :success
- assert ! @response.body.include?("... This diff was truncated")
- assert @response.body.include?("... Ce diff")
+ 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")
+
+ Setting.default_language = 'fr'
+ get :diff, :id => PRJ_ID, :type => 'inline',
+ :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
+ assert_response :success
+ assert ! @response.body.include?("... This diff was truncated")
+ assert @response.body.include?("... Ce diff")
+ end
end
end