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.35.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.34.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.34.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.33.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.32.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.32.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.32.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.31.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.30.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.29.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.28.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.27.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.26.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.26.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.26.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.25.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.24.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.24.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.24.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.23.0 test/hexapdf/type/actions/test_uri.rb