Sha256: b4b078e2cbed68ba90fcbe7182aa0a83cb2ee15b04b3e71de5f16dd300e78bd5

Contents?: true

Size: 896 Bytes

Versions: 8

Compression:

Stored size: 896 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', :password => 'secret' }
      @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

8 entries across 8 versions & 1 rubygems

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