]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: add unit adapter test that last revision of empty branch is 0.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 May 2011 02:51:15 +0000 (02:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 May 2011 02:51:15 +0000 (02:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5934 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 093aaed0abad3c2c73172e95be01fcff457ba3c8..2074aa8b06252fe42a73cbe2409ef629dbc059c1 100644 (file)
@@ -100,6 +100,13 @@ begin
         assert_equal 4, info.lastrev.identifier.to_i
       end
 
+      def test_info_emtpy
+        adpt = Redmine::Scm::Adapters::BazaarAdapter.new(
+                                File.join(REPOSITORY_PATH, "empty-branch")
+                                )
+        assert_equal 0, adpt.info.lastrev.identifier.to_i
+      end
+
       def test_entries_path_invalid
         assert_equal [], @adapter.entries('invalid')
       end