test/unit/generator/pdf/test_document.rb in thinreports-0.9.1 vs test/unit/generator/pdf/test_document.rb in thinreports-0.10.0

- old
+ new

@@ -1,20 +1,22 @@ -# coding: utf-8 +# 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_without_page_creation + def test_new pdf = Document.new assert_equal pdf.internal.page_count, 0 - end - - def test_new_with_zero_margin_canvas - pdf = Document.new 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