Adds a test for revision diff as raw format.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8042 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-03 13:18:00 +00:00
parent 39ae7b66f8
commit 582574bace
1 changed files with 12 additions and 0 deletions

View File

@ -325,6 +325,18 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
end
end
def test_revision_diff_raw_format
assert_equal 0, @repository.changesets.count
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
get :diff, :id => PRJ_ID, :rev => 3, :format => 'diff'
assert_response :success
assert_equal 'text/x-patch', @response.content_type
assert_equal 'Index: subversion_test/textfile.txt', @response.body.split(/\r?\n/).first
end
def test_directory_diff
assert_equal 0, @repository.changesets.count
@repository.fetch_changesets