Sha256: 76df18a5d3e39b66b552f8da634b5bcce19446074ae68e9fcaa3acd07f2313cd

Contents?: true

Size: 546 Bytes

Versions: 18

Compression:

Stored size: 546 Bytes

Contents

require 'spec_helper'

describe Xmlenc do

  Dir["spec/fixtures/encrypted/*.txt"].each do |document|
    describe "#{document}" do
      let(:encrypted_xml) { Base64.decode64(File.read(document)) }
      let(:encrypted_document) { Xmlenc::EncryptedDocument.new(encrypted_xml) }
      let(:private_key) { OpenSSL::PKey::RSA.new(File.read(document.gsub('.txt', '.pem'))) }

      it "should be validateable" do
        expect {
          @decrypted = encrypted_document.decrypt(private_key)
        }.not_to raise_error
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
xmlenc-0.8.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.7.1 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.7.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.9 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.8 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.6 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.5 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.4 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.3 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.2 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.1 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.6.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.5.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.4.1 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.4.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.3.0 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.2.1 spec/lib/xmlenc/xmlenc_spec.rb
xmlenc-0.2.0 spec/lib/xmlenc/xmlenc_spec.rb