]> source.dussan.org Git - redmine.git/commitdiff
scm: cvs: add annotate test of HEAD revision in unit model test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Apr 2011 15:44:38 +0000 (15:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Apr 2011 15:44:38 +0000 (15:44 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5411 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_cvs_test.rb

index 8011743404c77ff7046e6d88494a9e0e9f36a4f6..c29a192039e47288e762e12d881f7b1c255a6a20 100644 (file)
@@ -131,6 +131,18 @@ class RepositoryCvsTest < ActiveSupport::TestCase
       # invalid revision
       assert @repository.cat('README', '123').blank?
     end
+
+    def test_annotate
+      @repository.fetch_changesets
+      @repository.reload
+      ann = @repository.annotate('README')
+      assert ann
+      assert_equal 2, ann.revisions.length
+      assert_equal '1.2', ann.revisions[1].revision
+      assert_equal 'LANG', ann.revisions[1].author
+      assert_equal 'with one change', ann.lines[1]
+   end
+
   else
     puts "CVS test repository NOT FOUND. Skipping unit tests !!!"
     def test_fake; assert true end