summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_cvs_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-02 10:00:20 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-02 10:00:20 +0000
commit08f02c5b65b6a684fa137e1d4f2972c9d41494f4 (patch)
tree96cfc908c5710d779ac3f608a58d1d6cc25a9d6f /test/unit/repository_cvs_test.rb
parentf7f858f05663e45b16ff75fe77bd17988a7c40b4 (diff)
downloadredmine-08f02c5b65b6a684fa137e1d4f2972c9d41494f4.tar.gz
redmine-08f02c5b65b6a684fa137e1d4f2972c9d41494f4.zip
scm: cvs: add fetch_changesets at all unit app test methods.
Redmine generates pseudo revision number, so all tests need to read database. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4791 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_cvs_test.rb')
-rw-r--r--test/unit/repository_cvs_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb
index 530ff9012..5e0f9850e 100644
--- a/test/unit/repository_cvs_test.rb
+++ b/test/unit/repository_cvs_test.rb
@@ -35,6 +35,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
if File.directory?(REPOSITORY_PATH)
def test_fetch_changesets_from_scratch
+ assert_equal 0, @repository.changesets.count
@repository.fetch_changesets
@repository.reload
@@ -44,6 +45,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
end
def test_fetch_changesets_incremental
+ assert_equal 0, @repository.changesets.count
@repository.fetch_changesets
# Remove the 3 latest changesets
@repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy)
@@ -55,6 +57,11 @@ class RepositoryCvsTest < ActiveSupport::TestCase
end
def test_deleted_files_should_not_be_listed
+ assert_equal 0, @repository.changesets.count
+ @repository.fetch_changesets
+ @repository.reload
+ assert_equal 5, @repository.changesets.count
+
entries = @repository.entries('sources')
assert entries.detect {|e| e.name == 'watchers_controller.rb'}
assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'}