Sha256: 08c44c856b926444ea1123a84f7f7391fb8b0b36955f3dbf8219c2993e89ca31
Contents?: true
Size: 983 Bytes
Versions: 9
Compression:
Stored size: 983 Bytes
Contents
require File.dirname(__FILE__) + '/../../test_helper' class PageIntegerTest < ActiveSupport::TestCase def test_initialize_tag %w( <cms:page:content:integer/> <cms:page:content:integer> ).each do |tag_signature| assert tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), tag_signature) assert_equal 'content', tag.label end end def test_initialize_tag_failure %w( <cms:page:content:not_integer/> <cms:page:content/> <cms:not_page:content/> not_a_tag ).each do |tag_signature| assert_nil CmsTag::PageInteger.initialize_tag(cms_pages(:default), tag_signature) end end def test_content_and_render tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), "<cms:page:content:integer>") assert tag.content.blank? tag.content = '5' assert_equal 5, tag.content assert_equal 5, tag.read_attribute(:content_integer) assert_equal '5', tag.render end end
Version data entries
9 entries across 9 versions & 1 rubygems