Sha256: ddf796c1313ecc9ccee7d3c44d5dbd83cedd94df74ae49dad21f522b3164a929

Contents?: true

Size: 564 Bytes

Versions: 44

Compression:

Stored size: 564 Bytes

Contents

require 'spec_helper.rb'

describe Rack::OAuth2::Client::Grant::JWTBearer do
  let(:grant) { Rack::OAuth2::Client::Grant::JWTBearer }

  context 'when JWT assertion is given' do
    let :attributes do
      {assertion: 'header.payload.signature'}
    end
    subject { grant.new attributes }
    its(:as_json) do
      should == {grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', assertion: 'header.payload.signature'}
    end
  end

  context 'otherwise' do
    it do
      expect { grant.new }.to raise_error AttrRequired::AttrMissing
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
rack-oauth2-2.2.1 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.2.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.1.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.0.1 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.0.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.0.0.rc3 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.0.0.rc2 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-2.0.0.rc1 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.21.3 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.21.2 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.21.1 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.21.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.20.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.19.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.18.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.17.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.16.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.15.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.14.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb
rack-oauth2-1.13.0 spec/rack/oauth2/client/grant/jwt_bearer_spec.rb