Commit 07f7b8503233c104b3559eb9e46b661d6ccf6382
1 parent
7dbd8a28
Exists in
ratings_minor_fixes
and in
3 other branches
html_safe for error message and test fix
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -1130,7 +1130,7 @@ module ApplicationHelper | @@ -1130,7 +1130,7 @@ module ApplicationHelper | ||
1130 | content_tag(:div, :class => 'errorExplanation', :id => 'errorExplanation') do | 1130 | content_tag(:div, :class => 'errorExplanation', :id => 'errorExplanation') do |
1131 | content_tag(:h2, _('Errors while saving')) + | 1131 | content_tag(:h2, _('Errors while saving')) + |
1132 | content_tag(:ul) do | 1132 | content_tag(:ul) do |
1133 | - safe_join(errors.map { |err| content_tag(:li, err) }) | 1133 | + safe_join(errors.map { |err| content_tag(:li, err.html_safe) }) |
1134 | end | 1134 | end |
1135 | end | 1135 | end |
1136 | end | 1136 | end |
plugins/organization_ratings/test/functional/organization_ratings_plugin_profile_controller_test.rb
@@ -46,7 +46,7 @@ class OrganizationRatingsPluginProfileControllerTest < ActionController::TestCas | @@ -46,7 +46,7 @@ class OrganizationRatingsPluginProfileControllerTest < ActionController::TestCas | ||
46 | test "do not create community_rating without a rate value" do | 46 | test "do not create community_rating without a rate value" do |
47 | post :new_rating, profile: @community.identifier, :comments => {:body => ""}, :organization_rating_value => nil | 47 | post :new_rating, profile: @community.identifier, :comments => {:body => ""}, :organization_rating_value => nil |
48 | 48 | ||
49 | - assert_match "value: can't be blank", session[:notice] | 49 | + assert_tag :tag => 'div', :attributes => {:class => /errorExplanation/}, :content => /Value can't be blank/ |
50 | end | 50 | end |
51 | 51 | ||
52 | test "do not create two ratings on Community when vote once config is true" do | 52 | test "do not create two ratings on Community when vote once config is true" do |