Sha256: ed559b2a2f1eb7dee4dd21233453259e87b2436edd6b04e559820eb180ead67b

Contents?: true

Size: 703 Bytes

Versions: 100

Compression:

Stored size: 703 Bytes

Contents

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

require_relative 'common'
require 'hexapdf/filter/encryption'

describe HexaPDF::Filter::Encryption do
  before do
    @obj = HexaPDF::Filter::Encryption
  end

  it "returns the correct decryption fiber" do
    algorithm = Minitest::Mock.new
    algorithm.expect(:decryption_fiber, :fiber, [:key, :source])
    assert_equal(:fiber, @obj.decoder(:source, key: :key, algorithm: algorithm))
    algorithm.verify
  end

  it "returns the correct encryption fiber" do
    algorithm = Minitest::Mock.new
    algorithm.expect(:encryption_fiber, :fiber, [:key, :source])
    assert_equal(:fiber, @obj.encoder(:source, key: :key, algorithm: algorithm))
    algorithm.verify
  end
end

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
hexapdf-1.2.0 test/hexapdf/filter/test_encryption.rb
hexapdf-1.1.1 test/hexapdf/filter/test_encryption.rb
hexapdf-1.1.0 test/hexapdf/filter/test_encryption.rb
hexapdf-1.0.3 test/hexapdf/filter/test_encryption.rb
hexapdf-1.0.2 test/hexapdf/filter/test_encryption.rb
hexapdf-1.0.1 test/hexapdf/filter/test_encryption.rb
hexapdf-1.0.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.47.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.46.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.45.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.44.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.41.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.40.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.39.1 test/hexapdf/filter/test_encryption.rb
hexapdf-0.39.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.38.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.37.2 test/hexapdf/filter/test_encryption.rb
hexapdf-0.37.1 test/hexapdf/filter/test_encryption.rb
hexapdf-0.37.0 test/hexapdf/filter/test_encryption.rb
hexapdf-0.36.0 test/hexapdf/filter/test_encryption.rb