]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: add unit adapter test of default path_encoding is UTF-8 (#2274).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 02:18:07 +0000 (02:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 02:18:07 +0000 (02:18 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5865 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb

index 7cc0cfd4da669b3777b0ffee93c0e37c887cf50d..0f4511d5a0feec8eb388ef0693063ec7e50b99ae 100644 (file)
@@ -31,6 +31,21 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
       # Revision number is ignored
       assert_equal "TEST CAT\n", @adapter.cat("/test", 1)
     end
+
+    def test_path_encoding_default_utf8
+      adpt1 = Redmine::Scm::Adapters::FilesystemAdapter.new(
+                                  REPOSITORY_PATH
+                                )
+      assert_equal "UTF-8", adpt1.path_encoding
+      adpt2 = Redmine::Scm::Adapters::FilesystemAdapter.new(
+                                  REPOSITORY_PATH,
+                                  nil,
+                                  nil,
+                                  nil,
+                                  ""
+                                )
+      assert_equal "UTF-8", adpt2.path_encoding
+    end
   else
     puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS."
     def test_fake; assert true end