]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add named branch test in functional test (#7246).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Mar 2011 13:42:16 +0000 (13:42 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Mar 2011 13:42:16 +0000 (13:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5130 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_mercurial_controller_test.rb

index 3aa2bd797088cac3964ae5e991fc102d72635986..e7fb9e5e3e1bdbc23b85c07fc90be5fc6079dead 100644 (file)
@@ -149,6 +149,27 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
       end
     end
 
+    def test_show_branch
+      @repository.fetch_changesets
+      @repository.reload
+       [
+          'default',
+          @branch_char_1,
+          'branch (1)[2]&,%.-3_4',
+          @branch_char_0,
+          'test_branch.latin-1',
+          'test-branch-00',
+      ].each do |bra|
+        get :show, :id => 3, :rev => bra
+        assert_response :success
+        assert_template 'show'
+        assert_not_nil assigns(:entries)
+        assert assigns(:entries).size > 0
+        assert_not_nil assigns(:changesets)
+        assigns(:changesets).size > 0
+      end
+    end
+
     def test_changes
       get :changes, :id => 3, :path => ['images', 'edit.png']
       assert_response :success