summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-17 07:58:05 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-17 07:58:05 +0000
commit55748b6fc0dc2a4c38ab9edc154ad2899e358820 (patch)
treebd62a990f39ed8753dd2dcdfc511c58038ec0539 /test
parente05e9179fd9ed3646fbf55245089114aab3dcdb6 (diff)
downloadredmine-55748b6fc0dc2a4c38ab9edc154ad2899e358820.tar.gz
redmine-55748b6fc0dc2a4c38ab9edc154ad2899e358820.zip
scm: bazaar: add revisions test to unit lib test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10408 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb16
1 files changed, 16 insertions, 0 deletions
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 3752caf06..e100e9d37 100644
--- a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb
@@ -151,6 +151,22 @@ begin
assert_nil @adapter.entries(nil, 12345678)
end
+ def test_revisions
+ revisions = @adapter.revisions(nil, 4, 2)
+ assert_equal 3, revisions.size
+ assert_equal 2, revisions[2].identifier
+ assert_equal 'jsmith@foo.bar-20071203175224-v0eog5d5wrgdrshg', revisions[2].scmid
+ assert_equal 4, revisions[0].identifier
+ assert_equal 'jsmith@foo.bar-20071203175422-t40bf8li5zz0c4cg', revisions[0].scmid
+ assert_equal 2, revisions[0].paths.size
+ assert_equal 'D', revisions[0].paths[0][:action]
+ assert_equal '/doc-deleted.txt', revisions[0].paths[0][:path]
+ assert_equal 'docdeleted.txt-20071203175320-iwwj561ojuubs3gt-1', revisions[0].paths[0][:revision]
+ assert_equal 'M', revisions[0].paths[1][:action]
+ assert_equal '/directory/doc-ls.txt', revisions[0].paths[1][:path]
+ assert_equal 'docls.txt-20071203175005-a3hyc3mn0shl7cgu-1', revisions[0].paths[1][:revision]
+ end
+
def test_revisions_path_invalid
assert_nil @adapter.revisions('invalid')
end