* add latest changesets for the current directory when browsing the repository and a link to the full log
* ability to diff a directory (#3575)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2849 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-09-01 12:13:17 +00:00
parent 71abeb5898
commit 5b97570693
7 changed files with 39 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
assert_equal ['folder', '.project', 'helloworld.c', 'helloworld.rb', 'textfile.txt'], assigns(:entries).collect(&:name)
end
def test_changes
def test_file_changes
get :changes, :id => 1, :path => ['subversion_test', 'folder', 'helloworld.rb' ]
assert_response :success
assert_template 'changes'
@@ -94,6 +94,16 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
:child => { :tag => 'span', :content => 'native' } }
end
end
def test_directory_changes
get :changes, :id => 1, :path => ['subversion_test', 'folder' ]
assert_response :success
assert_template 'changes'
changesets = assigns(:changesets)
assert_not_nil changesets
assert_equal %w(7 6 5 2), changesets.collect(&:revision)
end
def test_entry
get :entry, :id => 1, :path => ['subversion_test', 'helloworld.c']
@@ -181,11 +191,22 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
}
end
def test_diff
def test_revision_diff
get :diff, :id => 1, :rev => 3
assert_response :success
assert_template 'diff'
end
def test_directory_diff
get :diff, :id => 1, :rev => 6, :rev_to => 2, :path => ['subversion_test', 'folder']
assert_response :success
assert_template 'diff'
diff = assigns(:diff)
assert_not_nil diff
# 2 files modified
assert_equal 2, Redmine::UnifiedDiff.new(diff).size
end
def test_annotate
get :annotate, :id => 1, :path => ['subversion_test', 'helloworld.c']