diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-28 12:09:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-28 12:09:09 +0000 |
commit | 9a85d4d063e370c5b058328d62d39794f968c90f (patch) | |
tree | 015aa424848b970f721d9f4d59a3365f90ba51a2 /test | |
parent | d6c299f57d8227745137a62327ed86123682b089 (diff) | |
download | redmine-9a85d4d063e370c5b058328d62d39794f968c90f.tar.gz redmine-9a85d4d063e370c5b058328d62d39794f968c90f.zip |
Fixed: Git blame/annotate fails on moved files (#3832).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3513 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/git_adapter_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/git_adapter_test.rb b/test/unit/git_adapter_test.rb index 9ab25c154..b75606d6b 100644 --- a/test/unit/git_adapter_test.rb +++ b/test/unit/git_adapter_test.rb @@ -15,6 +15,20 @@ class GitAdapterTest < ActiveSupport::TestCase def test_getting_all_revisions assert_equal 12, @adapter.revisions('',nil,nil,:all => true).length end + + def test_annotate + annotate = @adapter.annotate('sources/watchers_controller.rb') + assert_kind_of Redmine::Scm::Adapters::Annotate, annotate + assert_equal 41, annotate.lines.size + end + + def test_annotate_moved_file + annotate = @adapter.annotate('renamed_test.txt') + assert_kind_of Redmine::Scm::Adapters::Annotate, annotate + assert_equal 2, annotate.lines.size + assert_equal "Let's pretend I'm adding a new feature!", annotate.lines.second + assert_equal "7e61ac704deecde634b51e59daa8110435dcb3da", annotate.revisions.second.identifier + end else puts "Git test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end |