Sha256: 8131d392a23c545bb2d6e618b466094e4db3087e9b9bf40bfc671b2e026eabaf

Contents?: true

Size: 735 Bytes

Versions: 49

Compression:

Stored size: 735 Bytes

Contents

require 'spec_helper'

describe HelloSign::Api::Account do
  describe '#get_oauth_token' do
    context 'when successful request' do
      before do
        stub_post_oauth('/oauth/token', 'token')
        @oauth_info = HelloSign.get_oauth_token :state => 'state', :code => 'code'
      end

      it 'should get the correct resource' do
        expect(a_post_oauth('/oauth/token')).to have_been_made
      end
    end
  end

  describe '#refresh_oauth_token' do
    before do
      stub_post_oauth('/oauth/token', 'token')
      @oauth_info = HelloSign.refresh_oauth_token refresh_token: 'oauth_token'
    end

    it 'should get the correct resource' do
      expect(a_post_oauth('/oauth/token')).to have_been_made
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
hellosign-api-1.0.7 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.6 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.5 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.4 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.3 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.2 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.1 spec/hello_sign/api/oauth_spec.rb
hellosign-api-1.0.0 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.7 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.6 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.5 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.4 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.3 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.2 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.1 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.7.0 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.6.4 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.6.3 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.6.2 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.6.1 spec/hello_sign/api/oauth_spec.rb