Sha256: f008c1e8b609d681d0491e5210117a8ba5999f32c806a052208b101b8a590611

Contents?: true

Size: 983 Bytes

Versions: 17

Compression:

Stored size: 983 Bytes

Contents

require 'spec_helper'
require 'saml_idp/logout_request_builder'

module SamlIdp
  describe LogoutRequestBuilder 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(:name_id) { 'some_name_id' }
    let(:algorithm) { OpenSSL::Digest::SHA256 }

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

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

Version data entries

17 entries across 17 versions & 2 rubygems

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