Sha256: d5cc4e8c9226ace0d59491e8f0980dc71bfd2bcc392d420dd725151623e320ee

Contents?: true

Size: 663 Bytes

Versions: 7

Compression:

Stored size: 663 Bytes

Contents

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

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

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

  describe "validation" do
    it "needs a launch target" do
      refute(@action.validate)

      @action.value = {Win: {F: "test.exe"}}
      assert(@action.validate)
      @action.value = {Mac: 'test'}
      assert(@action.validate)
      @action.value = {Unix: 'test'}
      assert(@action.validate)

      @action.value = {F: {}}
      assert(@action.validate)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hexapdf-1.2.0 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.1.1 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.1.0 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.0.3 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.0.2 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.0.1 test/hexapdf/type/actions/test_launch.rb
hexapdf-1.0.0 test/hexapdf/type/actions/test_launch.rb