Sha256: 49ad462f2d36cc4aa363648de48eb630b08f77597993f80bd6ffd7eb3777fcca

Contents?: true

Size: 991 Bytes

Versions: 19

Compression:

Stored size: 991 Bytes

Contents

require 'spec_helper'
require 'saml_idp/logout_response_builder'

module SamlIdp
  describe LogoutResponseBuilder do
    before do
      Timecop.freeze(Time.local(1990))
    end

    after do
      Timecop.return
    end

    let(:response_id) { 'some_response_id' }
    let(:issuer_uri) { 'http://example.com' }
    let(:saml_slo_url) { 'http://localhost:3000/saml/logout' }
    let(:request_id) { 'some_request_id' }
    let(:algorithm) { OpenSSL::Digest::SHA256 }

    subject do
      described_class.new(
        response_id,
        issuer_uri,
        saml_slo_url,
        request_id,
        algorithm
      )
    end

    it "is a valid LogoutResponse" do
      Timecop.travel(Time.zone.local(2010, 6, 1, 13, 0, 0)) do
        logout_response = OneLogin::RubySaml::Logoutresponse.new(
          subject.encoded,
          saml_settings('localhost:3000')
        )
        logout_response.soft = false
        expect(logout_response.validate).to eq true
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
saml_idp-0.16.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.15.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.14.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.12.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.11.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.10.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.9.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.8.1 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.8.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.7.2 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.7.1 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.7.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.6.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.5.0 spec/lib/saml_idp/logout_response_builder_spec.rb
icn_saml_idp-0.4.1 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.4.0 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.3.2 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.3.1 spec/lib/saml_idp/logout_response_builder_spec.rb
saml_idp-0.3.0 spec/lib/saml_idp/logout_response_builder_spec.rb