Sha256: c4e1705c96acda78b612334c62cf1dada87efc7ec3415e0565f4b0bbc32d56dd

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

require "test_helper"

class RenderingTest < ActionDispatch::IntegrationTest
  test "Generate PDF on the fly in a controller" do
    get "/tex/example.pdf"
    assert_match (/application\/pdf/), response.headers["Content-Type"]
    reader = PDF::Reader.new(StringIO.new(response.body))
    assert_equal 1, reader.pages.count
    assert_match (/Test latex document/), reader.pages.first.text
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
latexpdf-0.4.1 test/integration/rendering_test.rb