]> source.dussan.org Git - redmine.git/commitdiff
Fixed that enumerations option tags are escaped.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 May 2012 08:45:15 +0000 (08:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 May 2012 08:45:15 +0000 (08:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9681 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/enumerations/destroy.html.erb
test/functional/enumerations_controller_test.rb

index 02e66bd9f0fe4a82a30fcaefbab72c41bb4c224a..3b47b40b2612d1cc1101e2bd10c694d6088593cb 100644 (file)
@@ -4,7 +4,7 @@
 <div class="box">
 <p><strong><%= l(:text_enumeration_destroy_question, @enumeration.objects_count) %></strong></p>
 <p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
-<%= select_tag 'reassign_to_id', ("<option>--- #{l(:actionview_instancetag_blank_option)} ---</option>" + options_from_collection_for_select(@enumerations, 'id', 'name')) %></p>
+<%= select_tag 'reassign_to_id', (content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") + options_from_collection_for_select(@enumerations, 'id', 'name')) %></p>
 </div>
 
 <%= submit_tag l(:button_apply) %>
index 7378e6f46b2b25254a32bd139aaac08963293d0a..b13fc86f7267e0b88ad840968cac63cfe5329c36 100644 (file)
@@ -105,6 +105,9 @@ class EnumerationsControllerTest < ActionController::TestCase
     assert_response :success
     assert_template 'destroy'
     assert_not_nil Enumeration.find_by_id(4)
+    assert_select 'select[name=reassign_to_id]' do
+      assert_select 'option[value=6]', :text => 'High'
+    end
   end
 
   def test_destroy_enumeration_in_use_with_reassignment