Sha256: 4808bea3f79b25fa94858ee13f06f9594d510eea2bff3babc3d90522c0ca5ca8

Contents?: true

Size: 867 Bytes

Versions: 3

Compression:

Stored size: 867 Bytes

Contents

require 'ostruct'
require 'awesome_print'
require File.expand_path( 'spec/spec_helper' )

describe OmniAuth::Strategies::CAS::ServiceTicketValidator do
  let(:strategy_stub) do
    stub('strategy stub',
      :service_validate_url => "https://example.org/serviceValidate"
    )
  end

  let(:provider_options) do
    stub('provider options',
      :disable_ssl_verification? => false,
      :ca_path => '/etc/ssl/certsZOMG'
    )
  end

  let(:validator) do
    OmniAuth::Strategies::CAS::ServiceTicketValidator.new( strategy_stub, provider_options, "/foo", nil )
  end

  describe "#user_info" do
    before do
      stub_request(:get, "https://example.org/serviceValidate?").to_return(:status => 200, :body => '')
      validator.user_info
    end
    it "should use the configured CA path" do
      provider_options.should have_received(:ca_path)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
omniauth-cas-0.0.7 spec/omniauth/strategies/cas/service_ticket_validator_spec.rb
omniauth-cas-0.0.6 spec/omniauth/strategies/cas/service_ticket_validator_spec.rb
omniauth-cas-0.0.5 spec/omniauth/strategies/cas/service_ticket_validator_spec.rb