Commit ac9e72b591c690f172693c5b1b75bb4ee5a30ac6
1 parent
791c0eef
Exists in
staging
and in
1 other branch
fix ckeditor plugin unit test
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/ckeditor_content/test/unit/ckeditor_content_plugin/ckeditor_article_test.rb
... | ... | @@ -85,7 +85,7 @@ class CkeditorArticleTest < ActiveSupport::TestCase |
85 | 85 | assert_includes Environment.default.trusted_sites_for_iframe, 'itheora.org' |
86 | 86 | |
87 | 87 | article = create(CkeditorContentPlugin::CkeditorArticle, :profile => profile, :name => 'article', :abstract => 'abstract', :body => "<iframe src='http://itheora.org/videos.ogg' src='http://untrusted_site.com/videos.ogg'></iframe>") |
88 | - assert_equal '', article.body | |
88 | + assert_equal '<iframe src="http://itheora.org/videos.ogg"></iframe>', article.body | |
89 | 89 | end |
90 | 90 | |
91 | 91 | should 'not sanitize html comments' do |
... | ... | @@ -93,7 +93,7 @@ class CkeditorArticleTest < ActiveSupport::TestCase |
93 | 93 | article.body = '<p><!-- <asdf> << aasdfa >>> --> <h1> Wellformed html code </h1>' |
94 | 94 | article.valid? |
95 | 95 | |
96 | - assert_match /<!-- .* --> <h1> Wellformed html code <\/h1>/, article.body | |
96 | + assert_match /<p><!-- .* --> <\/p><h1> Wellformed html code <\/h1>/, article.body | |
97 | 97 | end |
98 | 98 | |
99 | 99 | should 'not allow XSS on name' do | ... | ... |