##// END OF EJS Templates
Do not propose non-assignable version (#11506)....
Jean-Philippe Lang -
r9904:9b4d29dc0d0c
parent child
Show More
@@ -91,10 +91,6 module ProjectsHelper
91 versions.each do |version|
91 versions.each do |version|
92 grouped[version.project.name] << [version.name, version.id]
92 grouped[version.project.name] << [version.name, version.id]
93 end
93 end
94 # Add in the selected
95 if selected && !versions.include?(selected)
96 grouped[selected.project.name] << [selected.name, selected.id]
97 end
98
94
99 if grouped.keys.size > 1
95 if grouped.keys.size > 1
100 grouped_options_for_select(grouped, selected && selected.id)
96 grouped_options_for_select(grouped, selected && selected.id)
@@ -127,6 +127,7 class VersionsControllerTest < ActionController::TestCase
127 assert_response :success
127 assert_response :success
128 assert_template 'create'
128 assert_template 'create'
129 assert_equal 'text/javascript', response.content_type
129 assert_equal 'text/javascript', response.content_type
130 assert_include 'test_add_version_from_issue_form', response.body
130 end
131 end
131
132
132 def test_create_from_issue_form_with_failure
133 def test_create_from_issue_form_with_failure
@@ -72,6 +72,6 class ProjectsHelperTest < ActionView::TestCase
72
72
73 def test_version_options_for_select_with_no_versions
73 def test_version_options_for_select_with_no_versions
74 assert_equal '', version_options_for_select([])
74 assert_equal '', version_options_for_select([])
75 assert_equal '<option value="1" selected="selected">0.1</option>', version_options_for_select([], Version.find(1))
75 assert_equal '', version_options_for_select([], Version.find(1))
76 end
76 end
77 end
77 end
General Comments 0
You need to be logged in to leave comments. Login now