OSDN Git Service

scm: filesystem: add test of no extension file whose content is only ASCII can be...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Mar 2011 10:45:39 +0000 (10:45 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Mar 2011 10:45:39 +0000 (10:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5198 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_filesystem_controller_test.rb

index 4cd8f1b..7f569b6 100644 (file)
@@ -46,7 +46,7 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
     def test_browse_root
       @repository.fetch_changesets
       @repository.reload
-      get :show, :id => 3
+      get :show, :id => PRJ_ID
       assert_response :success
       assert_template 'show'
       assert_not_nil assigns(:entries)
@@ -54,6 +54,16 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
       assert_not_nil assigns(:changesets)
       assert assigns(:changesets).size == 0
     end
+
+    def test_show_no_extension
+      get :entry, :id => PRJ_ID, :path => ['test']
+      assert_response :success
+      assert_template 'entry'
+      assert_tag :tag => 'th',
+                 :content => '1',
+                 :attributes => { :class => 'line-num' },
+                 :sibling => { :tag => 'td', :content => /TEST CAT/ }
+    end
   else
     puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!"
     def test_fake; assert true end