]> source.dussan.org Git - redmine.git/commitdiff
Fix that @tracker_ids[]@ field is rendered multiple time. Add some assertions to...
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 20 Mar 2022 22:16:11 +0000 (22:16 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 20 Mar 2022 22:16:11 +0000 (22:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@21482 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/versions/_sidebar.html.erb
test/functional/versions_controller_test.rb

index 0eb517c2413997dc70ff643c74ef8d070ebcb446..aecb7d131e65baba5656821a5e9f03f0f5b9b49d 100644 (file)
@@ -1,9 +1,9 @@
 <%= form_tag({}, :method => :get) do %>
+<%= hidden_field_tag "tracker_ids[]", nil, :id => nil %>
 <h3><%= l(:label_roadmap) %></h3>
 <ul>
 <% @trackers.each do |tracker| %>
   <li>
-    <%= hidden_field_tag "tracker_ids[]", nil, :id => nil %>
     <label>
       <%= check_box_tag("tracker_ids[]", tracker.id,
                         (@selected_tracker_ids.include? tracker.id.to_s),
index 80e51880e473f8d19d05e7e35d0d474d8e07c6c5..fdd767560bd47723407bb1912dc7b7830a0f48f6 100644 (file)
@@ -45,6 +45,9 @@ class VersionsControllerTest < Redmine::ControllerTest
     # Context menu on issues
     assert_select "form[data-cm-url=?]", '/issues/context_menu'
     assert_select "div#sidebar" do
+      # Tracker checkboxes
+      assert_select 'input[type=hidden][name=?]', 'tracker_ids[]'
+      assert_select 'input[type=checkbox][name=?]', 'tracker_ids[]', 3
       # Links to versions anchors
       assert_select 'a[href=?]', '#2.0'
       # Links to completed versions in the sidebar