Commit b37152e
Changed files (2)
lib
saml
spec
lib/saml/kit/logout_request.rb
@@ -15,7 +15,7 @@ module Saml
def single_logout_service
return if provider.nil?
urls = provider.single_logout_services
- return urls.first[:location] if urls.any?
+ urls.first
end
def response_for(user)
spec/saml/logout_request_spec.rb
@@ -38,7 +38,7 @@ RSpec.describe Saml::Kit::LogoutRequest do
allow(registry).to receive(:metadata_for).and_return(metadata)
allow(metadata).to receive(:matches?).and_return(true)
allow(metadata).to receive(:single_logout_services).and_return([
- { location: FFaker::Internet.http_url, binding: Saml::Kit::Namespaces::POST }
+ Saml::Kit::HttpPostBinding.new(location: FFaker::Internet.http_url)
])
end
@@ -94,7 +94,7 @@ RSpec.describe Saml::Kit::LogoutRequest do
allow(registry).to receive(:metadata_for).with(builder.issuer).and_return(metadata)
allow(metadata).to receive(:matches?).and_return(true)
allow(metadata).to receive(:single_logout_services).and_return([
- { location: FFaker::Internet.http_url, binding: Saml::Kit::Namespaces::POST }
+ Saml::Kit::HttpPostBinding.new(location: FFaker::Internet.http_url)
])
expect(builder.build).to be_valid