Sha256: c04f6f62e8ae617950ef4cc688a6e72a2e33b5ac13ced78c9bbc6bf5209ecb1f

Contents?: true

Size: 525 Bytes

Versions: 48

Compression:

Stored size: 525 Bytes

Contents

require 'spec_helper.rb'

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

  context 'when refresh_token is given' do
    let :attributes do
      {refresh_token: 'refresh_token'}
    end
    subject { grant.new attributes }
    its(:as_json) do
      should == {grant_type: :refresh_token, refresh_token: 'refresh_token'}
    end
  end

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

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
rack-oauth2-1.13.0.beta spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.12.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.11.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.10.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.10.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.9.3 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.9.2 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.9.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.9.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.8.2 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.8.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.8.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.7.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.7.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.6.4 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.6.3 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.6.2 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.6.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.6.0 spec/rack/oauth2/client/grant/refresh_token_spec.rb
rack-oauth2-1.5.1 spec/rack/oauth2/client/grant/refresh_token_spec.rb