Sha256: d5871bfa329c88ffcb29203693dea6bfc4c5535ef3ecb7213607e951e8cd0e9a
Contents?: true
Size: 659 Bytes
Versions: 3
Compression:
Stored size: 659 Bytes
Contents
require 'test_helper' require 'pdf/reader' class PdfControllerTest < ActionController::TestCase test "should get a pdf" do get :render_pdf assert_response :success reader = PDF::Reader.new(StringIO.new(@response.body)) assert_not_nil(reader) #do some basic assertions assert_equal(1, reader.page_count) assert_match(/Hello There :D/, reader.pages[0].to_s) assert_no_match(/This should not be any where/, reader.pages[0].to_s) assert_no_match(/ITEMS ARE nil/, reader.pages[0].to_s) assert_match(/with html<bold><\/bold>/,reader.pages[0].to_s) assert_match(/without html LD/,reader.pages[0].to_s) end end
Version data entries
3 entries across 3 versions & 1 rubygems