Sha256: 857f686de266a6a0a1809aa6bcfb052bd61d14a3e17184b69696659fcac92c6d

Contents?: true

Size: 869 Bytes

Versions: 1

Compression:

Stored size: 869 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:80/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

1 entries across 1 versions & 1 rubygems

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