]> source.dussan.org Git - redmine.git/commitdiff
Merged r4621 from trunk.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Jan 2011 14:37:55 +0000 (14:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Jan 2011 14:37:55 +0000 (14:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4622 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_subversion_test.rb

index 5034c30cfc8768b64d517e61d842952b96c5b37d..302a331f9fa307e923f2e62d9ea897bdc3b56ec6 100644 (file)
@@ -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 !!!"