summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-10-28 05:18:28 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-10-28 05:18:28 +0000
commitdaae07f47c105f0daeac7af4a059f8a60a167a3e (patch)
tree6272346aa2b5825d4d8028f468a99cb6ea242201 /test
parentcec6f5c3b0a07d3e99c78557850a2d3ea9e73daa (diff)
downloadredmine-daae07f47c105f0daeac7af4a059f8a60a167a3e.tar.gz
redmine-daae07f47c105f0daeac7af4a059f8a60a167a3e.zip
scm: git: test: lib: update branches test for Branch class (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7672 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/scm/adapters/git_adapter_test.rb23
1 files changed, 17 insertions, 6 deletions
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 96bdb4d0a..c5da9732a 100644
--- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
@@ -61,12 +61,23 @@ begin
end
def test_branches
- assert_equal [
- 'latin-1-path-encoding',
- 'master',
- 'test-latin-1',
- 'test_branch',
- ], @adapter.branches
+ brs = []
+ @adapter.branches.each do |b|
+ brs << b
+ end
+ assert_equal 4, brs.length
+ assert_equal 'latin-1-path-encoding', brs[0].to_s
+ assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', brs[0].revision
+ assert_equal brs[0].scmid, brs[0].revision
+ assert_equal 'master', brs[1].to_s
+ assert_equal '83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', brs[1].revision
+ assert_equal brs[1].scmid, brs[1].revision
+ assert_equal 'test-latin-1', brs[2].to_s
+ assert_equal '67e7792ce20ccae2e4bb73eed09bb397819c8834', brs[2].revision
+ assert_equal brs[2].scmid, brs[2].revision
+ assert_equal 'test_branch', brs[3].to_s
+ assert_equal 'fba357b886984ee71185ad2065e65fc0417d9b92', brs[3].revision
+ assert_equal brs[3].scmid, brs[3].revision
end
def test_tags