summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-01 10:27:30 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-01 10:27:30 +0000
commit5f5dec16f2ececf806404d497886e9cb5e454281 (patch)
treea7d7998ba8f8da7ac92ec0592ff6a13c52f4479b /test/unit/repository_test.rb
parentc09b6edaf405754b969566b9da7d9284f80a34e6 (diff)
downloadredmine-5f5dec16f2ececf806404d497886e9cb5e454281.tar.gz
redmine-5f5dec16f2ececf806404d497886e9cb5e454281.zip
scm: add feature of per project repository log encoding setting (#1735).
Subversion, Mercurial and Git supports UTF-8 log. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4982 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r--test/unit/repository_test.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 8c4146ff0..4e6099e3e 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -125,16 +125,19 @@ class RepositoryTest < ActiveSupport::TestCase
assert_not_equal( comment, changeset.comments )
assert_equal( 'This is a loooooooooooooooooooooooooooong comment', changeset.comments )
end
-
+
def test_for_urls_strip
- repository = Repository::Cvs.create(:project => Project.find(4), :url => ' :pserver:login:password@host:/path/to/the/repository',
- :root_url => 'foo ')
+ repository = Repository::Cvs.create(
+ :project => Project.find(4),
+ :url => ' :pserver:login:password@host:/path/to/the/repository',
+ :root_url => 'foo ',
+ :log_encoding => 'UTF-8')
assert repository.save
repository.reload
assert_equal ':pserver:login:password@host:/path/to/the/repository', repository.url
assert_equal 'foo', repository.root_url
end
-
+
def test_manual_user_mapping
assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do
c = Changeset.create!(:repository => @repository, :committer => 'foo', :committed_on => Time.now, :revision => 100, :comments => 'Committed by foo.')