Fixed failing subversion test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4621 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e0d6f8db1d
commit
29fddddaf1
|
@ -116,28 +116,19 @@ class RepositorySubversionTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_activities
|
def test_activities
|
||||||
@repository.fetch_changesets
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
||||||
@repository.reload
|
:revision => '1', :comments => 'test')
|
||||||
f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
|
|
||||||
f.scope = ['changesets']
|
assert c.event_title.include?('1:'), c.event_title
|
||||||
events = f.events
|
assert_equal c.event_url[:rev], '1'
|
||||||
assert_kind_of Array, events
|
|
||||||
eve = events[-9]
|
|
||||||
assert eve.event_title.include?('1:')
|
|
||||||
assert_equal eve.event_url[:rev], '1'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_activities_nine_digit
|
def test_activities_nine_digit
|
||||||
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
c = Changeset.new(:repository => @repository, :committed_on => Time.now,
|
||||||
:revision => '123456789', :comments => 'test')
|
:revision => '123456789', :comments => 'test')
|
||||||
assert( c.save )
|
|
||||||
f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
|
assert c.event_title.include?('123456789:')
|
||||||
f.scope = ['changesets']
|
assert_equal c.event_url[:rev], '123456789'
|
||||||
events = f.events
|
|
||||||
assert_kind_of Array, events
|
|
||||||
eve = events[-11]
|
|
||||||
assert eve.event_title.include?('123456789:')
|
|
||||||
assert_equal eve.event_url[:rev], '123456789'
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"
|
puts "Subversion test repository NOT FOUND. Skipping unit tests !!!"
|
||||||
|
|
Loading…
Reference in New Issue