Sha256: 9b31f5fc4fc8d278494f8e9a73488b9812e9e30ad74a233983d47b6ce6e94230

Contents?: true

Size: 898 Bytes

Versions: 4

Compression:

Stored size: 898 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

4 entries across 4 versions & 1 rubygems

Version Path
hellosign-ruby-sdk-3.0.3 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.0.2 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.0.1 spec/hello_sign/api/account_spec.rb
hellosign-ruby-sdk-3.0.0 spec/hello_sign/api/account_spec.rb