@@ -10,7 +10,7 | |||||
10 | :id => @project, |
|
10 | :id => @project, | |
11 | :repository_id => @repository.identifier_param, |
|
11 | :repository_id => @repository.identifier_param, | |
12 | :path => to_path_param(@path), |
|
12 | :path => to_path_param(@path), | |
13 |
:rev => |
|
13 | :rev => nil}, | |
14 | {:method => :get, :id => 'revision_selector'}) do -%> |
|
14 | {:method => :get, :id => 'revision_selector'}) do -%> | |
15 | <!-- Branches Dropdown --> |
|
15 | <!-- Branches Dropdown --> | |
16 | <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> |
|
16 | <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> |
@@ -163,6 +163,16 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
163 | end |
|
163 | end | |
164 | end |
|
164 | end | |
165 |
|
165 | |||
|
166 | def show_should_show_branch_selection_form | |||
|
167 | @repository.fetch_changesets | |||
|
168 | @project.reload | |||
|
169 | get :show, :id => PRJ_ID | |||
|
170 | assert_tag 'form', :attributes => {:id => 'revision_selector', :action => '/projects/subproject1/repository/show'} | |||
|
171 | assert_tag 'select', :attributes => {:name => 'branch'}, | |||
|
172 | :child => {:tag => 'option', :attributes => {:value => 'test-branch-01'}}, | |||
|
173 | :parent => {:tag => 'form', :attributes => {:id => 'revision_selector'}} | |||
|
174 | end | |||
|
175 | ||||
166 | def test_show_branch |
|
176 | def test_show_branch | |
167 | assert_equal 0, @repository.changesets.count |
|
177 | assert_equal 0, @repository.changesets.count | |
168 | @repository.fetch_changesets |
|
178 | @repository.fetch_changesets |
General Comments 0
You need to be logged in to leave comments.
Login now