Sha256: 7eb6ab48ba6c1bd2c6103670adf7bafb7d93d85f2cc8365124a7c044fe4175a0

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

require File.expand_path('../../unit_test_helper', __FILE__)

class TedTest < Minitest::Test
  def test_transform_url_with_www
    output = auto_html('http://www.ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html') { ted }
    assert_equal '<iframe width="640" height="360" frameborder="0" scrolling="no" src="http://embed.ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html"></iframe>', output
  end

  def test_transform_url_without_www
    output = auto_html('http://ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html') { ted }
    assert_equal '<iframe width="640" height="360" frameborder="0" scrolling="no" src="http://embed.ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html"></iframe>', output
  end

  def test_transform_url_with_options
    result = auto_html('http://www.ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html') { ted(:width => '50%', :height => '100', :scrolling => 'yes', :frameborder => 1, :allow_full_screen => true) }
    assert_equal '<iframe width="50%" height="100" frameborder="1" scrolling="yes" src="http://embed.ted.com/talks/amy_cuddy_your_body_language_shapes_who_you_are.html" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>', result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auto_html-whistlerbrk-2.0.0.pre test/unit/filters/ted_test.rb