Sha256: 0c06fa1375b9c1716911658bf21f1bc6e2ac34400406b27c4635192ac35fe559
Contents?: true
Size: 748 Bytes
Versions: 12
Compression:
Stored size: 748 Bytes
Contents
require 'spec_helper' describe Xmldsig::Transforms::EnvelopedSignature do let(:unsigned_xml) { File.read('spec/fixtures/unsigned_nested_signature.xml') } let(:unsigned_document) { Xmldsig::SignedDocument.new(unsigned_xml) } it 'only removes the outer most signature element' do node_with_nested_signature = unsigned_document.signatures.first.references.first.referenced_node described_class.new(node_with_nested_signature, nil).transform remaining_signatures = node_with_nested_signature.xpath('descendant::ds:Signature', Xmldsig::NAMESPACES) remaining_signatures.count.should == 1 signature = Xmldsig::Signature.new(remaining_signatures.first) signature.references.first.reference_uri.should == '#baz' end end
Version data entries
12 entries across 12 versions & 1 rubygems