Sha256: 420d02cfa60ed825545ca4a661a65d072ea9bc19e057e5ff9c5b885e110af70e

Contents?: true

Size: 618 Bytes

Versions: 10

Compression:

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

  test "should prerender header and footer :template options" do
    options = @ac.send( :prerender_header_and_footer,
                        :header => {:html => { :template => 'hf.html.erb'}});
    assert !options[:header][:html].has_key?(:template)
    assert_match /^file:\/\/.*wicked_header_pdf.*\.html/, options[:header][:html][:url]
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

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