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.33.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.32.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.32.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.32.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.31.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.30.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.29.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.28.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.27.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.26.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.26.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.26.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.25.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.24.2 test/hexapdf/filter/test_crypt.rb
hexapdf-0.24.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.24.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.23.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.22.0 test/hexapdf/filter/test_crypt.rb
hexapdf-0.21.1 test/hexapdf/filter/test_crypt.rb
hexapdf-0.21.0 test/hexapdf/filter/test_crypt.rb