summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_subversion_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-02 14:36:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-02 14:36:12 +0000
commit29fddddaf1b2ee3e0c8c6759d1e0c0a9cc13475c (patch)
treef5c61b1fdc22578608b903dc03f4e031c06448be /test/unit/repository_subversion_test.rb
parente0d6f8db1d83183517f139561bc09e2fcf2488e1 (diff)
downloadredmine-29fddddaf1b2ee3e0c8c6759d1e0c0a9cc13475c.tar.gz
redmine-29fddddaf1b2ee3e0c8c6759d1e0c0a9cc13475c.zip
Fixed failing subversion test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4621 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_subversion_test.rb')
-rw-r--r--test/unit/repository_subversion_test.rb25
1 files changed, 8 insertions, 17 deletions
diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb
index 5034c30cf..302a331f9 100644
--- a/test/unit/repository_subversion_test.rb
+++ b/test/unit/repository_subversion_test.rb
@@ -116,28 +116,19 @@ class RepositorySubversionTest < ActiveSupport::TestCase
end
def test_activities
- @repository.fetch_changesets
- @repository.reload
- f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
- f.scope = ['changesets']
- events = f.events
- assert_kind_of Array, events
- eve = events[-9]
- assert eve.event_title.include?('1:')
- assert_equal eve.event_url[:rev], '1'
+ c = Changeset.new(:repository => @repository, :committed_on => Time.now,
+ :revision => '1', :comments => 'test')
+
+ assert c.event_title.include?('1:'), c.event_title
+ assert_equal c.event_url[:rev], '1'
end
def test_activities_nine_digit
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
:revision => '123456789', :comments => 'test')
- assert( c.save )
- f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
- f.scope = ['changesets']
- events = f.events
- assert_kind_of Array, events
- eve = events[-11]
- assert eve.event_title.include?('123456789:')
- assert_equal eve.event_url[:rev], '123456789'
+
+ assert c.event_title.include?('123456789:')
+ assert_equal c.event_url[:rev], '123456789'
end
else
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"