Sha256: a36d0898551a5c4e3aa3ddb31826ab84a82b7663d6ce6c5292ecdea81c3e7190

Contents?: true

Size: 530 Bytes

Versions: 16

Compression:

Stored size: 530 Bytes

Contents

require "spec_helper"

describe Xmlenc::Builder::DigestMethod do

  let(:xml) { File.read File.join("spec", "fixtures", "template2.xml") }
  subject { described_class.parse(xml, :single => true) }

  describe "#parse" do
    it "should have one algorithm" do
      expect(subject.algorithm).to eq "http://www.w3.org/2000/09/xmldsig#sha1"
    end

    it "raises error when no algorithm" do
      subject.algorithm = nil
      expect(subject).to_not be_valid
      expect(subject.errors[:algorithm].size).to eq(1)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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