Commit 532a0ca
Changed files (2)
lib
saml
kit
spec
saml
kit
lib/saml/kit/document.rb
@@ -39,7 +39,7 @@ module Saml
# Returns the Version of the SAML document.
def version
- root.fetch('Version', {})
+ at_xpath('./*/@Version').try(:value)
end
# Returns the Destination of the SAML document.
spec/saml/kit/document_spec.rb
@@ -11,6 +11,7 @@ RSpec.describe Saml::Kit::Document do
specify { expect(subject.id).to eql(id) }
specify { expect(subject.issuer).to eql(issuer) }
+ specify { expect(subject.version).to eql("2.0") }
describe '.to_saml_document' do
subject { described_class }