Removed deprecation errors for rails 1.2.3. Corrected test case failures as a result of updated features and functionality

This commit is contained in:
Matt MacGillivray 2007-05-07 22:46:00 +00:00
parent 322a09274f
commit 36b86a9d41
21 changed files with 174 additions and 159 deletions

View file

@ -156,11 +156,19 @@ class PageRendererTest < Test::Unit::TestCase
'_should we go ThatWay or ThisWay _')
end
def test_content_with_wikiword_in_tag
# wikiwords are invalid as styles, must be in "name: value" form
def test_content_with_wikiword_in_style_tag
assert_markup_parsed_as(
'<p>That is some <em style="WikiWord">Stylish Emphasis</em></p>',
'<p>That is some <em style="">Stylish Emphasis</em></p>',
'That is some <em style="WikiWord">Stylish Emphasis</em>')
end
# validates format of style..
def test_content_with_valid_style_in_style_tag
assert_markup_parsed_as(
'<p>That is some <em style="text-align: right;">Stylish Emphasis</em></p>',
'That is some <em style="text-align: right">Stylish Emphasis</em>')
end
def test_content_with_escaped_wikiword
# there should be no wiki link
@ -196,9 +204,10 @@ class PageRendererTest < Test::Unit::TestCase
assert_markup_parsed_as(
'<p>This <img src="http://hobix.com/sample.jpg" alt="" /> is an inline image link.</p>',
'This <img src="http://hobix.com/sample.jpg" alt="" /> is an inline image link.')
# currently, upper case HTML elements are not allowed
assert_markup_parsed_as(
'<p>This <IMG SRC="http://hobix.com/sample.jpg" alt=""> is an inline image link.</p>',
'<p>This &lt;IMG SRC="http://hobix.com/sample.jpg" alt=""> is an inline image link.</p>',
'This <IMG SRC="http://hobix.com/sample.jpg" alt=""> is an inline image link.')
end