]> source.dussan.org Git - redmine.git/commitdiff
Fix subversion and git activities test reffering r4621.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 3 Jan 2011 10:44:23 +0000 (10:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 3 Jan 2011 10:44:23 +0000 (10:44 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4623 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_git_test.rb
test/unit/repository_subversion_test.rb

index cec0917606dad6aee93d97a9992b8ee30ff558fd..10ca791b21e8046a244826258d000ba5c7110756 100644 (file)
@@ -78,15 +78,12 @@ class RepositoryGitTest < 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?('7234cb27:')
-      assert_equal eve.event_url[:rev], '7234cb2750b63f47bff735edc50a1c0a433c2518'
+      c = Changeset.new(:repository => @repository, :committed_on => Time.now,
+                        :revision => 'abc7234cb2750b63f47bff735edc50a1c0a433c2',
+                        :scmid    => 'abc7234cb2750b63f47bff735edc50a1c0a433c2',
+                        :comments => 'test')
+      assert c.event_title.include?('abc7234c:')
+      assert_equal c.event_url[:rev], 'abc7234cb2750b63f47bff735edc50a1c0a433c2'
     end
   else
     puts "Git test repository NOT FOUND. Skipping unit tests !!!"
index 302a331f9fa307e923f2e62d9ea897bdc3b56ec6..c61431b33c66cb663de3c6f2c21d8501d094402c 100644 (file)
@@ -118,15 +118,13 @@ class RepositorySubversionTest < ActiveSupport::TestCase
     def test_activities
       c = Changeset.new(:repository => @repository, :committed_on => Time.now,
                         :revision => '1', :comments => 'test')
-      
-      assert c.event_title.include?('1:'), c.event_title
+      assert c.event_title.include?('1:')
       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.event_title.include?('123456789:')
       assert_equal c.event_url[:rev], '123456789'
     end