Sha256: 5e88ac3b95b82d51c3f40484a27dd57bd37ea002aad295266a87ed39a7ad00a8
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 KB
Contents
describe OmniAuth::Strategies::CAS::Configuration do subject { described_class.new } let(:options) { Hashie::Mash.new params } let(:params) do { 'host' => 'example.org', 'login_url' => '/' } end describe '#initialize' do let(:params) do { 'url' => 'http://example.org:8080', 'login_url' => '/' } end it 'should initialize the configuration' do described_class.any_instance.should_receive(:extract_url) described_class.any_instance.should_receive(:validate_cas_setup) described_class.new options end context 'with a URL property' do subject { described_class.new( options ).instance_variable_get('@options') } it 'should parse the URL' do subject.host.should eq 'example.org' subject.port.should eq 8080 subject.ssl.should be_false end end context 'without a URL property' do let(:params) do { 'host' => 'example.org', 'login_url' => '/' } end subject { described_class.new( options ) } it 'should not parse the url' do described_class.any_instance .should_receive(:extract_url) .never described_class.new options end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-cas-1.0.1 | spec/omniauth/strategies/cas/configuration_spec.rb |