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-0.20.4 test/hexapdf/filter/test_crypt.rb
hexapdf-0.20.3 test/hexapdf/filter/test_crypt.rb
hexapdf-0.20.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.20.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.20.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.19.3 test/hexapdf/filter/test_crypt.rb
hexapdf-0.19.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.19.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.19.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.18.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.17.3 test/hexapdf/filter/test_crypt.rb
hexapdf-0.17.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.16.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.9 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.8 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.7 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.6 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.5 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.4 test/hexapdf/filter/test_crypt.rb
hexapdf-0.15.3 test/hexapdf/filter/test_crypt.rb