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-1.1.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-1.1.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-1.0.3 test/hexapdf/type/actions/test_uri.rb
hexapdf-1.0.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-1.0.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-1.0.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.47.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.46.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.45.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.44.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.41.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.40.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.39.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.39.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.38.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.37.2 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.37.1 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.37.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.36.0 test/hexapdf/type/actions/test_uri.rb
hexapdf-0.35.1 test/hexapdf/type/actions/test_uri.rb