Sha256: b63fa2efb25be0596de09dafde151297bf9f417add9db359d651378054bb6211

Contents?: true

Size: 1.11 KB

Versions: 8

Compression:

Stored size: 1.11 KB

Contents

require 'test_helper'
require 'action_view/test_case'

class WickedPdfHelperTest < ActionView::TestCase
  test 'wicked_pdf_stylesheet_link_tag should inline the stylesheets passed in' do
    assert_equal "<style type='text/css'>/* Wicked styles */\n</style>",
                 wicked_pdf_stylesheet_link_tag('../../vendor/plugins/wicked_pdf/test/fixtures/wicked')
  end

  test 'wicked_pdf_image_tag should return the same as image_tag when passed a full path' do
    assert_equal image_tag("file://#{Rails.root.join('public','images','pdf')}"),
                 wicked_pdf_image_tag('pdf')
  end

  test 'wicked_pdf_javascript_src_tag should return the same as javascript_src_tag when passed a full path' do
    assert_equal javascript_src_tag("file://#{Rails.root.join('public','javascripts','pdf')}", {}),
                 wicked_pdf_javascript_src_tag('pdf')
  end

  test 'wicked_pdf_include_tag should return many wicked_pdf_javascript_src_tags' do
    assert_equal [wicked_pdf_javascript_src_tag('foo'), wicked_pdf_javascript_src_tag('bar')].join("\n"),
                 wicked_pdf_javascript_include_tag('foo', 'bar')
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
wicked_pdf_rails_2-0.7.9.1 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.9 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.8 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.7 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.6 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.5 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.4 test/wicked_pdf_helper_test.rb
wicked_pdf-0.7.3 test/wicked_pdf_helper_test.rb