Sha256: bb08aa691ede81801d02101a1d53e344a769fbff3203d0ac1942359e7048194e

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'test_helper'
require 'hexapdf/document'
require 'hexapdf/type/annotations/link'

describe HexaPDF::Type::Annotations::Link do
  before do
    @doc = HexaPDF::Document.new
    @annot = HexaPDF::Type::Annotations::Link.new({Rect: [0, 0, 1, 1]}, document: @doc)
  end

  describe "validation" do
    it "checks for valid /H value" do
      @annot[:H] = :invalid
      refute(@annot.validate {|msg| assert_match(/contains invalid value/, msg)})
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hexapdf-0.6.0 test/hexapdf/type/annotations/test_link.rb