Sha256: 2aabd644226ee076abc37f0202c37fb356880842d7a0ef8e42e57339d3b5b305

Contents?: true

Size: 590 Bytes

Versions: 64

Compression:

Stored size: 590 Bytes

Contents

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

require 'test_helper'
require 'hexapdf/filter/crypt'

describe HexaPDF::Filter::Crypt do
  before do
    @obj = HexaPDF::Filter::Crypt
    @source = Fiber.new { "hallo" }
  end

  it "works with the Identity filter" do
    assert_equal(@source, @obj.decoder(@source, nil))
    assert_equal(@source, @obj.encoder(@source, {})) # sic: 'encoder'
    assert_equal(@source, @obj.decoder(@source, {Name: :Identity}))
  end

  it "fails if crypt filter name is not Identity" do
    assert_raises(HexaPDF::FilterError) { @obj.decoder(@source, {Name: :Other}) }
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
hexapdf-1.0.2 test/hexapdf/filter/test_crypt.rb
hexapdf-1.0.1 test/hexapdf/filter/test_crypt.rb
hexapdf-1.0.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.47.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.46.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.45.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.44.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.41.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.40.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.39.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.39.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.38.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.37.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.37.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.37.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.36.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.35.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.35.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.34.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.34.0 test/hexapdf/filter/test_crypt.rb