From 2716f355dd584bb25ea9c5029665ef5a44cfc2c7 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 23 Feb 2011 11:47:54 -0300 Subject: [PATCH] The actual HTML generated by Rails 2.3.5 changed --- test/unit/cms_helper_test.rb | 4 ++-- test/unit/link_list_block_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/cms_helper_test.rb b/test/unit/cms_helper_test.rb index 74ed6d6..0bc33c5 100644 --- a/test/unit/cms_helper_test.rb +++ b/test/unit/cms_helper_test.rb @@ -16,8 +16,8 @@ class CmsHelperTest < ActiveSupport::TestCase should 'show custom options for blog' do CmsHelperTest.any_instance.stubs(:controller).returns(ActionController::Base.new) result = options_for_article(Blog.new) - assert_match /id="article\[published\]" name="article\[published\]" type="hidden" value="1"/, result - assert_match /id="article\[accept_comments\]" name="article\[accept_comments\]" type="hidden" value="0"/, result + assert_tag_in_string result, :tag => 'input', :attributes => { :name => 'article[published]' , :type => "hidden", :value => "1" } + assert_tag_in_string result, :tag => 'input', :attributes => { :name => "article[accept_comments]", :type => "hidden", :value => "0" } end should 'display link to folder content if article is folder' do diff --git a/test/unit/link_list_block_test.rb b/test/unit/link_list_block_test.rb index a31298d..c7dca8a 100644 --- a/test/unit/link_list_block_test.rb +++ b/test/unit/link_list_block_test.rb @@ -64,7 +64,7 @@ class LinkListBlockTest < ActiveSupport::TestCase should 'not add link to onclick' do l = LinkListBlock.new(:links => [{:name => 'link', :address => "#\" onclick=\"alert(123456)"}]) - assert_no_match /onclick/, l.link_html(l.links.first) + assert_no_tag_in_string l.link_html(l.links.first), :attributes => { :onclick => /.*/ } end should 'add http in front of incomplete external links' do -- libgit2 0.21.2