diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 17:01:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 17:01:33 +0000 |
commit | 9b60214b3a3e25691400cd3bbf11191429bc3c1c (patch) | |
tree | 38c618b12de578d1c616ead006d58a9bc5161f4b /test | |
parent | 4d12bea397bc1a79c16ec8000bbb8e5fae323c4b (diff) | |
download | redmine-9b60214b3a3e25691400cd3bbf11191429bc3c1c.tar.gz redmine-9b60214b3a3e25691400cd3bbf11191429bc3c1c.zip |
Fixed that Repository#entries returns an Array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9804 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_bazaar_test.rb | 1 | ||||
-rw-r--r-- | test/unit/repository_cvs_test.rb | 1 | ||||
-rw-r--r-- | test/unit/repository_darcs_test.rb | 5 | ||||
-rw-r--r-- | test/unit/repository_filesystem_test.rb | 7 | ||||
-rw-r--r-- | test/unit/repository_git_test.rb | 5 | ||||
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 5 | ||||
-rw-r--r-- | test/unit/repository_subversion_test.rb | 5 |
7 files changed, 28 insertions, 1 deletions
diff --git a/test/unit/repository_bazaar_test.rb b/test/unit/repository_bazaar_test.rb index 2713f9473..12bc02040 100644 --- a/test/unit/repository_bazaar_test.rb +++ b/test/unit/repository_bazaar_test.rb @@ -88,6 +88,7 @@ class RepositoryBazaarTest < ActiveSupport::TestCase def test_entries entries = @repository.entries + assert_kind_of Redmine::Scm::Adapters::Entries, entries assert_equal 2, entries.size assert_equal 'dir', entries[0].kind diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 0fc1873c7..b718246b2 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -158,6 +158,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase @project.reload assert_equal CHANGESETS_NUM, @repository.changesets.count entries = @repository.entries('', '3') + assert_kind_of Redmine::Scm::Adapters::Entries, entries assert_equal 3, entries.size assert_equal entries[2].name, "README" assert_equal entries[2].lastrev.time, Time.gm(2007, 12, 13, 16, 27, 22) diff --git a/test/unit/repository_darcs_test.rb b/test/unit/repository_darcs_test.rb index 9923e0cbd..53c91abb3 100644 --- a/test/unit/repository_darcs_test.rb +++ b/test/unit/repository_darcs_test.rb @@ -88,6 +88,11 @@ class RepositoryDarcsTest < ActiveSupport::TestCase assert_equal NUM_REV, @repository.changesets.count end + def test_entries + entries = @repository.entries + assert_kind_of Redmine::Scm::Adapters::Entries, entries + end + def test_entries_invalid_revision assert_equal 0, @repository.changesets.count @repository.fetch_changesets diff --git a/test/unit/repository_filesystem_test.rb b/test/unit/repository_filesystem_test.rb index 25e7c88a9..1cb2e7bda 100644 --- a/test/unit/repository_filesystem_test.rb +++ b/test/unit/repository_filesystem_test.rb @@ -70,7 +70,12 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase end def test_entries - assert_equal 3, @repository.entries("", 2).size + entries = @repository.entries("", 2) + assert_kind_of Redmine::Scm::Adapters::Entries, entries + assert_equal 3, entries.size + end + + def test_entries_in_directory assert_equal 2, @repository.entries("dir", 3).size end diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 9f053df57..53233fa75 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -97,6 +97,11 @@ class RepositoryGitTest < ActiveSupport::TestCase assert_equal true, klass.scm_available end + def test_entries + entries = @repository.entries + assert_kind_of Redmine::Scm::Adapters::Entries, entries + end + def test_fetch_changesets_from_scratch assert_nil @repository.extra_info diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 8d6e076d1..f64300748 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -81,6 +81,11 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal true, klass.scm_available end + def test_entries + entries = @repository.entries + assert_kind_of Redmine::Scm::Adapters::Entries, entries + end + def test_fetch_changesets_from_scratch assert_equal 0, @repository.changesets.count @repository.fetch_changesets diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb index 8ea8ce0c5..699ef886a 100644 --- a/test/unit/repository_subversion_test.rb +++ b/test/unit/repository_subversion_test.rb @@ -56,6 +56,11 @@ class RepositorySubversionTest < ActiveSupport::TestCase assert_equal NUM_REV, @repository.changesets.count end + def test_entries + entries = @repository.entries + assert_kind_of Redmine::Scm::Adapters::Entries, entries + end + def test_latest_changesets assert_equal 0, @repository.changesets.count @repository.fetch_changesets |