Sha256: 4fa0db3b37b6cddc6bc7e5dff450f674e7896e3cfc8b66f4388b9d00989a395d

Contents?: true

Size: 568 Bytes

Versions: 94

Compression:

Stored size: 568 Bytes

Contents

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

require 'test_helper'
require 'hexapdf/document'
require 'hexapdf/type/actions/uri'

describe HexaPDF::Type::Actions::URI do
  before do
    @doc = HexaPDF::Document.new
    @action = HexaPDF::Type::Actions::URI.new({}, document: @doc)
  end

  describe "validation" do
    it "URI needs to be ASCII only" do
      refute(@action.validate)

      @action[:URI] = "hellö"
      refute(@action.validate(auto_correct: false))
      assert(@action.validate(auto_correct: true))
      assert_equal("hell%C3%B6", @action[:URI])
    end
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
hexapdf-0.15.5 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.15.4 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.15.3 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.15.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.15.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.15.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.14.4 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.14.3 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.14.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.14.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.14.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.13.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.12.3 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.12.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.12.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.12.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.11.9 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.11.8 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.11.7 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.11.6 test/hexapdf/type/actions/test_uri.rb