Sha256: 34ecfe88d90a867f4d46d22ab671d5e6dbc34915f917f18764f12e25d7cfe680

Contents?: true

Size: 612 Bytes

Versions: 9

Compression:

Stored size: 612 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

9 entries across 9 versions & 1 rubygems

Version Path
wicked_pdf-0.11.0 test/functional/pdf_helper_test.rb
wicked_pdf-0.10.2 test/functional/pdf_helper_test.rb
wicked_pdf-0.10.0 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.10 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.9 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.8 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.7 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.6 test/functional/pdf_helper_test.rb
wicked_pdf-0.9.5 test/functional/pdf_helper_test.rb