From: Toshi MARUYAMA Date: Tue, 8 Mar 2011 06:37:18 +0000 (+0000) Subject: scm: git: add tests for tag entries() in unit adapter test. X-Git-Tag: 1.2.0~795 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6d763215a9b76b5b1d359d2b059bcb3848b88934;p=redmine.git scm: git: add tests for tag entries() in unit adapter test. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5047 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index fd8d1c224..de8b43583 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -139,6 +139,22 @@ begin end end + def test_entries_tag + entries1 = @adapter.entries(nil, 'tag01.annotated') + assert entries1 + assert_equal 3, 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 27, readme.size + assert_equal '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', readme.lastrev.identifier + assert_equal Time.gm(2007, 12, 14, 9, 24, 1), readme.lastrev.time + end + private def test_scm_version_for(scm_command_version, version)