Commit dcf73dee66154e5215dac640fae99ee86205c7d2
1 parent
6c2e04aa
Exists in
master
and in
29 other branches
Fix tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/cms_helper_test.rb
@@ -90,7 +90,7 @@ class CmsHelperTest < ActionView::TestCase | @@ -90,7 +90,7 @@ class CmsHelperTest < ActionView::TestCase | ||
90 | profile = fast_create(Profile) | 90 | profile = fast_create(Profile) |
91 | name = 'My folder' | 91 | name = 'My folder' |
92 | folder = fast_create(Folder, :name => name, :profile_id => profile.id) | 92 | folder = fast_create(Folder, :name => name, :profile_id => profile.id) |
93 | - confirm_message = "Are you sure that you want to remove the folder \"#{name}\"? Note that all the items inside it will also be removed!" | 93 | + confirm_message = CGI.escapeHTML("Are you sure that you want to remove the folder \"#{name}\"? Note that all the items inside it will also be removed!") |
94 | expects(:link_to).with('Delete', {:action => 'destroy', :id => folder.id}, :method => :post, :confirm => confirm_message, :class => 'button with-text icon-delete', :title => nil) | 94 | expects(:link_to).with('Delete', {:action => 'destroy', :id => folder.id}, :method => :post, :confirm => confirm_message, :class => 'button with-text icon-delete', :title => nil) |
95 | 95 | ||
96 | result = display_delete_button(folder) | 96 | result = display_delete_button(folder) |
@@ -101,7 +101,7 @@ class CmsHelperTest < ActionView::TestCase | @@ -101,7 +101,7 @@ class CmsHelperTest < ActionView::TestCase | ||
101 | profile = fast_create(Profile) | 101 | profile = fast_create(Profile) |
102 | name = 'My article' | 102 | name = 'My article' |
103 | article = fast_create(TinyMceArticle, :name => name, :profile_id => profile.id) | 103 | article = fast_create(TinyMceArticle, :name => name, :profile_id => profile.id) |
104 | - confirm_message = "Are you sure that you want to remove the item \"#{name}\"?" | 104 | + confirm_message = CGI.escapeHTML("Are you sure that you want to remove the item \"#{name}\"?") |
105 | expects(:link_to).with('Delete', {:action => 'destroy', :id => article.id}, :method => :post, :confirm => confirm_message, :class => 'button with-text icon-delete', :title => nil) | 105 | expects(:link_to).with('Delete', {:action => 'destroy', :id => article.id}, :method => :post, :confirm => confirm_message, :class => 'button with-text icon-delete', :title => nil) |
106 | 106 | ||
107 | result = display_delete_button(article) | 107 | result = display_delete_button(article) |