comparison test/unit/.svn/text-base/repository_test.rb.svn-base @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 07fa8a8b56a8
children cbce1fd3b1b7
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
123 :committer => 'foo <foo@example.com>', :committed_on => Time.now, :repository => repository ) 123 :committer => 'foo <foo@example.com>', :committed_on => Time.now, :repository => repository )
124 assert( changeset.save ) 124 assert( changeset.save )
125 assert_not_equal( comment, changeset.comments ) 125 assert_not_equal( comment, changeset.comments )
126 assert_equal( 'This is a loooooooooooooooooooooooooooong comment', changeset.comments ) 126 assert_equal( 'This is a loooooooooooooooooooooooooooong comment', changeset.comments )
127 end 127 end
128 128
129 def test_for_urls_strip 129 def test_for_urls_strip
130 repository = Repository::Cvs.create(:project => Project.find(4), :url => ' :pserver:login:password@host:/path/to/the/repository', 130 repository = Repository::Cvs.create(
131 :root_url => 'foo ') 131 :project => Project.find(4),
132 :url => ' :pserver:login:password@host:/path/to/the/repository',
133 :root_url => 'foo ',
134 :log_encoding => 'UTF-8')
132 assert repository.save 135 assert repository.save
133 repository.reload 136 repository.reload
134 assert_equal ':pserver:login:password@host:/path/to/the/repository', repository.url 137 assert_equal ':pserver:login:password@host:/path/to/the/repository', repository.url
135 assert_equal 'foo', repository.root_url 138 assert_equal 'foo', repository.root_url
136 end 139 end
137 140
138 def test_manual_user_mapping 141 def test_manual_user_mapping
139 assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do 142 assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do
140 c = Changeset.create!(:repository => @repository, :committer => 'foo', :committed_on => Time.now, :revision => 100, :comments => 'Committed by foo.') 143 c = Changeset.create!(:repository => @repository, :committer => 'foo', :committed_on => Time.now, :revision => 100, :comments => 'Committed by foo.')
141 assert_nil c.user 144 assert_nil c.user
142 @repository.committer_ids = {'foo' => '2'} 145 @repository.committer_ids = {'foo' => '2'}