Sha256: 5f027f3f7603d8070e2dda0c88c1cb40607c5ea26c72edec65379d9e3e9c3e81

Contents?: true

Size: 873 Bytes

Versions: 35

Compression:

Stored size: 873 Bytes

Contents

require 'spec_helper'

describe HelloSign::Api::Account do
  describe '#get_account' do
    before do
      stub_get('/account', 'account')
      @account = HelloSign.get_account
    end

    it 'should get the correct resource' do
      expect(a_get('/account')).to have_been_made
    end

    it 'should return current user account' do
      expect(@account).to be_an HelloSign::Resource::Account
    end
  end

  describe '#create_account' do
    before do
      stub_post('/account/create', 'account')
      @body = { :email_address => 'test@example.com' }
      @account = HelloSign.create_account @body
    end

    it 'should get the correct resource' do
      expect(a_post('/account/create')).to have_been_made
    end

    it 'should return information about a created account' do
      expect(@account.email_address).to eql('test@example.com')
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
hellosign-ruby-sdk-3.6.4 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.6.3 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.6.2 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.6.1 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.6 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.5.4 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.5.3 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.5.2 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.5.1 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.5.0 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.4.0 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.3.0 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.15 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.14 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.13 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.11 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.10 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.9 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.8 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.2.7 spec/hello_sign/api/account_spec.rb