From b4aedc95d9231f8c949e0543e3456b3ea5ddc362 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 May 2011 02:51:15 +0000 Subject: [PATCH] scm: bazaar: add unit adapter test that last revision of empty branch is 0. 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb index 093aaed0a..2074aa8b0 100644 --- a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb @@ -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