File: tc_item_htmloutput.rb

package info (click to toggle)
ruby-feedparser 0.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: ruby: 1,871; sh: 24; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'test/unit'
require 'feedparser'
require 'feedparser/html-output'


class ItemHTMLOutputTest < Test::Unit::TestCase
  def test_html_with_headers
    feed = FeedParser::Feed.new
    item = FeedParser::FeedItem.new(nil, feed)
    item.title = "Some great title"
    item.content = "Lorem ipsum ..."
    html = item.to_html_with_headers(false)
    assert_match(/Some great title/, html)
    assert_match(/Lorem ipsum .../, html)
    assert_match(/<style type="text\/css">/, html)
  end
end