Sha256: 2258e8a9bc65cc097c6beb6ec1c26cc9ccdbb8cc030fb8069e9de572bbf21baa

Contents?: true

Size: 1002 Bytes

Versions: 20

Compression:

Stored size: 1002 Bytes

Contents

require 'spec_helper'

describe OpenIDConnect::Discovery::Provider::Config::Response do
  let :instance do
    OpenIDConnect::Discovery::Provider::Config::Response.new attributes
  end
  let :attributes do
    {}
  end

  describe '#as_json' do
    subject {
      instance.as_json
    }

    context 'when no attributes given' do
      it do
        should == {:version => '3.0'}
      end
    end

    context 'when user_info_endpoint given' do
      let :attributes do
        {:user_info_endpoint => 'https://server.example.com/user_info'}
      end
      it do
        should include :userinfo_endpoint
      end
      it do
        should_not include :user_info_endpoint
      end
    end

    context 'when user_info_algs_supported given' do
      let :attributes do
        {:user_info_algs_supported => [:HS256, :RS256]}
      end
      it do
        should include :userinfo_algs_supported
      end
      it do
        should_not include :user_info_algs_supported
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
openid_connect-0.3.3 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.3.2 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.3.1 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.3.0 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.4 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.3 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.2 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.1 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.0 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.0.alpha3 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.0.alpha2 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.2.0.alpha spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.5 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.4 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.3 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.2 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.1 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.1.0 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.0.33 spec/openid_connect/discovery/provider/config/response_spec.rb
openid_connect-0.0.32 spec/openid_connect/discovery/provider/config/response_spec.rb