]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Git: Mercurial: Branch dropdown broken on repositories page (#10026).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 20 Jan 2012 19:46:28 +0000 (19:46 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 20 Jan 2012 19:46:28 +0000 (19:46 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8678 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/repositories/_navigation.html.erb
test/functional/repositories_mercurial_controller_test.rb

index 1776d2b7ef35e27632a4c5f2d8791814fe56bdec..ba38fed1a1762bdf9d33e9f7159944e46b85de80 100644 (file)
@@ -10,7 +10,7 @@
              :id => @project,
              :repository_id => @repository.identifier_param,
              :path => to_path_param(@path),
-             :rev => ''},
+             :rev => nil},
             {:method => :get, :id => 'revision_selector'}) do -%>
   <!-- Branches Dropdown -->
   <% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
index 2792a3fdbca3da5a9f9e2b96e4c4ea49d229b503..9218b4c8aad047fb2c7086a5240264b7499953bd 100644 (file)
@@ -163,6 +163,16 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
       end
     end
 
+    def show_should_show_branch_selection_form
+      @repository.fetch_changesets
+      @project.reload
+      get :show, :id => PRJ_ID
+      assert_tag 'form', :attributes => {:id => 'revision_selector', :action => '/projects/subproject1/repository/show'}
+      assert_tag 'select', :attributes => {:name => 'branch'},
+        :child => {:tag => 'option', :attributes => {:value => 'test-branch-01'}},
+        :parent => {:tag => 'form', :attributes => {:id => 'revision_selector'}}
+    end
+
     def test_show_branch
       assert_equal 0, @repository.changesets.count
       @repository.fetch_changesets