Sha256: c1c42e4ac02648ffe8f3ca122137e997ab3319635164e39f1263732f805b49e9

Contents?: true

Size: 720 Bytes

Versions: 10

Compression:

Stored size: 720 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 '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

10 entries across 10 versions & 1 rubygems

Version Path
hellosign-ruby-sdk-3.0.15 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.14 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.12 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.11 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.10 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.9 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.7 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.6 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.5 spec/hello_sign/api/oauth_spec.rb
hellosign-ruby-sdk-3.0.4 spec/hello_sign/api/oauth_spec.rb