]> source.dussan.org Git - redmine.git/commitdiff
scm: git: add tests for branch entries() in unit adapter test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 8 Mar 2011 06:37:39 +0000 (06:37 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 8 Mar 2011 06:37:39 +0000 (06:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5048 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/git_adapter_test.rb

index de8b4358310d41b324adff39c92c31332755a6a7..d393618200a2373550c279c042fa4d8ccef9dd91 100644 (file)
@@ -155,6 +155,22 @@ begin
         assert_equal Time.gm(2007, 12, 14, 9, 24, 1), readme.lastrev.time
       end
 
+      def test_entries_branch
+        entries1 = @adapter.entries(nil, 'test_branch')
+        assert entries1
+        assert_equal 4, entries1.size
+        assert_equal 'sources', entries1[1].name
+        assert_equal 'sources', entries1[1].path
+        assert_equal 'dir', entries1[1].kind
+        readme = entries1[2]
+        assert_equal 'README', readme.name
+        assert_equal 'README', readme.path
+        assert_equal 'file', readme.kind
+        assert_equal 159, readme.size
+        assert_equal '713f4944648826f558cf548222f813dabe7cbb04', readme.lastrev.identifier
+        assert_equal Time.gm(2009, 6, 19, 4, 37, 23), readme.lastrev.time
+      end
+
       private
 
       def test_scm_version_for(scm_command_version, version)