Sha256: 9ef478453dc8525f35fddb7cafd52951393e03fdd919d8ab9408173fb5f14404

Contents?: true

Size: 592 Bytes

Versions: 4

Compression:

Stored size: 592 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class Thinreports::Generator::PDF::TestDocument < Minitest::Test
  include Thinreports::TestHelper

  # Alias
  Document = Thinreports::Generator::PDF::Document

  def test_new
    pdf = Document.new
    assert_equal pdf.internal.page_count, 0
    assert_equal pdf.internal.page.margins.values, [0, 0, 0, 0]

    pdf = Document.new(security: { owner_password: 'abc' })
    assert_equal true, pdf.internal.state.encrypt

    pdf = Document.new(title: 'Title')
    assert_equal 'Title', pdf.internal.state.store.info.data[:Title]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.10.3 test/units/generator/pdf/test_document.rb
thinreports-0.10.2 test/unit/generator/pdf/test_document.rb
thinreports-0.10.1 test/unit/generator/pdf/test_document.rb
thinreports-0.10.0 test/unit/generator/pdf/test_document.rb