Sha256: dc28bb4c6b055a139feef66051732644c1ea63e681a49497552894fe6b3b0aa1

Contents?: true

Size: 617 Bytes

Versions: 5

Compression:

Stored size: 617 Bytes

Contents

require 'test_helper'

module ActionController
  class Base
    def render_to_string(opts = {})
      opts.to_s
    end
  end
end

class PdfHelperTest < ActionController::TestCase
  def setup
    @ac = ActionController::Base.new
  end

  def teardown
    @ac = nil
  end

  if Rails::VERSION::MAJOR == 2
    test 'should prerender header and footer :template options' do
      options = @ac.send(:prerender_header_and_footer,
                         :header => { :html => { :template => 'hf.html.erb' } })
      assert_match /^file:\/\/\/.*wicked_header_pdf.*\.html/, options[:header][:html][:url]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wicked_pdf-1.0.4 test/functional/pdf_helper_test.rb
wicked_pdf-1.0.3 test/functional/pdf_helper_test.rb
wicked_pdf-1.0.2 test/functional/pdf_helper_test.rb
wicked_pdf-1.0.1 test/functional/pdf_helper_test.rb
wicked_pdf-1.0.0 test/functional/pdf_helper_test.rb